The "windows should be grouped in terms of the applications" does not make sense to me AT ALL.
Most work is done on a project basis, which crosses application boundaries quite readily. E.g., one project might involve having an open Android Studio project, a PDF with documentation, a browser window and a note pad. "Cmd-tabbing", though, brings up the next window of the same application that I am currently on. Viewing a PDF with preview, this will bring up some random image most of the time? (Luckily this is fixed by AltTab)
No solutions for the dock from me though. Personally I hate how the dock can randomly move between two monitors if you just happen to drag a file through the area where the dock COULD go on your second screen.
Additionally, things I hate and have not been able to fix: how if you close a window of a specific application in MacOS, it moves another window of that same application forward (similar to the Cmd+Tab behaviour) and if you click on an application in the Dock, it brings forward ALL windows of that application (whereas I would expect only the most recently used one).