Bidirectional Electronic Relay
What you're looking for is called a multiplexer / demultiplexer. 

There's a whole series of them within the CD4000 (ancient!) family of ICs; you can also use more modern alternatives. I'd start with something like the CD74HC4067 (74xx series logic – old as time itself, but proven, and most importantly, does the job you need). 

Here's a link to Texas Instrument's Multiplexer product page, limited to those multiplexers with 22, 24 or 32 bits (i.e. lines). You'd need one of these for each data line you want to switch. Regarding power, I'd simply switch the +Vcc line with a set of high-side MOSFETs (although high-side switching is sometimes a bit of a pain, I think this is the easiest route), potentially addressed by a simple (daisy-chain of) shift register(s), if your controller happens to have too few pins.

In a phase of laziness, and assuming your devices don't draw > 20mA: Use digital switches to switch the 12V on and of.