Consider the standard TTL output cell, then consider splitting the pull-up and pull-down sections. Add inverters and gates, and that's how you synthesize a tristate gate (e.g. 74126, datasheet includes equivalent circuit, well heck, there 'ya go!).
And that's easy enough, so you get tristatable buffers, or muxes/selectors, working in one direction, very often.
A transmission gate, can be done in bipolar, but it's much more difficult; the usual way is a complementary pair of current sources (source and sink), to push base current into, and pull emitter current out of, the transistor; when no base current is applied, it's open both ways (assuming applied voltage is less than Veb, which is fine for 5V logic levels), and when biased, C and E saturate together -- and the saturation is maintained even to reverse bias (inverted operation), albeit having reduced hFE(inv) in most types.
Indeed, because inverted Vce(sat) is extremely low (can be just a few mV), these were used in very early high-performance DACs -- before JFETs and MOSFETs replaced them, not to mention ICs over discrete solutions (yes, a DAC made of arrays of 2N3904s or whatever -- the '60s were rough days!)