MicrocontrollerGuy wrote (in part):
But what is the best-practice way to source current from a 12V source and have it switched by a 5V GPIO pin?
It depends upon what you want to achieve: least number of parts, highest reliability, simplicity, lowest cost, use existing parts, use existing circuit, use only bipolar transistors, use only MOSFETs, use a combination of MOSFETs and bipolar transistors, use a relay, use a phototransistor, achieve electrical isolation, etc.