Two approaches - use 8-way analog multiplexers (these conduct both ways so can be used for TX and RX pins the same way).
Or keep in the digital domain and use 1-to-8-multiplexer and 8-to-1 selector chips for TX and RX respectively 74HC151, 74HC138 - this makes a bit more sense since you won't need pull-ups to stop noise on the deselected TX lines. The 74HC138 has normally-high outputs if that's the idle state for your serial links, otherwise the 74HC258 would do.