You can't route pins to pins; you can route functions to pins. For instance, if you do not like the default UART or SPI pins, you can use the GPIO matrix (usually indirectly, using an argument to the driver initialization call) to re-route it to a different GPIO. For GPIO pins used as GPIO pins, you just change the pin definition itself.
Can you tell us a bit more about why you'd want to do this? As it is, your question sounds like an
XY problem.