Most of this only becomes critical in 2 categories:
- High precision, e.g. measuring micro volts
- High speed, e.g. 100+MHz signals
You need to start thinking of your signal paths in loops, there is your signal, and also its return path, either through a power supply, ground, or some other signal line for differential signals.
You want this return path to follow your signal as closely as possible, be it next to it on the same layer, or directly under it on the opposite side, this couples each signals electric and magnetic feild to the other and both reduces outwards radiation, but also reduces how well external signals can couple, this is sometimes called "Loop area"
The sharing via's / grounds is only an issue when the current from one source can introduce a large enough voltage shift to upset another source, for high speed, the inductance of the via can make it drop a significant voltage, and for precision, a few mA can introduce more noise than signal to sensitive circuits,
For your via placement, the rule of thumb is your device connects to its decoupling capacitor, and then to the power rail, and you care more that the traces to the decoupling are short vs the traces off to your power supplies. this acts as a weak filter, as the resistance and more so the inductance of the traces form a low pass filter to soak up either supply noise in, or noise from your device out to the supply.
for high speed signals, vias are quite inductive, where possibly it is generally preferred that the decoupling is on the same side as the chip, and them the connection to the power rail jump off to the other side of the board.