I want to connect two external hard drives to the RPI4B. Since the Pi can not provide sufficient power for both of them, external power source is must. Are the USB power rails shared between all four ports? If yes, is it safe to connect the power source to one of the USB 2 ports (Just VBus and GND) and hard drives to USB 3 ports?
Simple Answer - no one knows, because the circuitry has never been published. See Raspberry Pi Power Limitations
NOTE if you are contemplating connecting a Power Supply to the USB ports - DON'T The Pi(3/2/B+) and probably Pi3B+ USB Current is supplied through a Current-Limited Power Switch (AP2553?) - supplying power to its output is unpredictable and potentially hazardous.
Buy a quality Powered USB Hub which doesn't back-feed power!