Grounding
All grounds in a car or system should have a common return point, such as a bolt that is chassis mounted. The battery ground is often right to the metal chassis close by. It is good but not ideal so some noise can exist. In electrical panels all grounds return to the panel that sourced the power, so no ground loops possible. A ground loop is created when a device ground connects to another devices ground before it reach's a common grounding point.
Assuming all grounding is solid and very low resistance:
Alternator
The key is not ground so much as it is the power feed to your head unit and amplifier. The whine comes from your alternator and the only way I have been able to kill the whine was to insert inductors in the power feeds to the head unit (most effective and lower cost) and power amplifiers.
Filters
The head unit seldom pulls more than 5 amps so a 10 amp 1 mH inductor (often in the shape of a toroid) often took care of the problem, because noise in the head unit is fed back to the amplifiers that faithfully amplify the noise as well as your music.
If some residual noise remains install 1 mH inductors to the power feeds (from the battery) to the amplifiers, rated for twice the current the amplifier is rated.
Battery
The battery is assumed to be a good noise filter, but if you test it for AC noise or use a oscilloscope on the terminals while the engine is running you may find several volts of noise that match the alternator whine. Filter capacitors are already in your head unit and amplifiers but like the battery they cannot filter out a strong alternator whine. The inductors complete the filter network by chocking off the whine about 99% in most cases.
Warnings
You could put an inductor at the alternator output but car manufactures warn that if it is too small (current rating) it will not handle the current passing through it and saturate, as in not filter out anything. Any inductor/power choke should be rated for twice the current expected to pass through it.
They also warn of inductors of low value that may actually resonate with the alternator whine and cause back-emf into the alternator, possibly damaging the alternator. Safer to install each inductor at its point of use or off the battery power tap (after the fuse) for the device.