A little something I did for my pc I shall attempt to describe the process. On my computer, I have rigged up 3 4-pin molex connectors on the rear panel of my case that are wired to 3 switches mounted in a spare 5.25" bay. There is a 4th switch that is intended for internal lighting if I wanted at a future date. I presently have them wired to output 12v to both power pins on each connector. The switches draw their power from a spare PCIE power connector on the power supply, 2 12v wires to power 4 switches. Yes, this can be dangerous but as long as I connect only 12v devices, no worries.
I originally wanted to wire up relays to feed 5v to the appropriate pins but I wanted solid state relays and haven’t gotten any yet. It can still be rewired to support this but for now, it’s powering a set of external hard drives.
To put it simply, you have PCIE power to switch to molex connector. 2 grounds from the pcie connector go to 3 ground pins each on the molex connectors, a 3rd ground goes to the switch leds for illumination. There is a 3rd power connection that could be used at a later date.