If you are doing a one-off project with through hole soldering, and could down grade one of your MCP23017's down to a MCP23008, the busboard SB830 would allow you to mount the Teensy 3.6 on the board, and provide ground/3.3v power rails down each side. This would allow you to 2 or 3 male/female headers to connect each pin/encoder separately:
The Adafruit full size Perma proto board might be useful as well, but you would need to deal with one of the MCP boards hanging off the end by one pin:
Also the large Azzy's Electronics prototype board might be usefu (you would stagger the Teensy and MCP's one different ends, so that each could bring out the 2 power rails and pins):
Note, the SB830 is single sided, which means you have to solder all of the headers/pins/etc. on one side. The Adafruit and Azzy boards are double sided.
However, it is a large amount of soldering to solder in the male or female headers, and to make sure each pin is connected and you did not create solder bridges.
If you can group your switches, I would think using either RJ45 jacks (8 wires) or IDC wire packs (2x3, 2x5, 2x8, etc.) would work better rather than having 48 separate connections, each of call fall off/wire break, etc.
For example, if you are using the Azzy board, you could put the Teensy and each of the MCPs at the left side of each of the mounting area, and put several of these 2x8 shrouded box mounts at the right side, and use a 16 pin IDC cable to go to each cluster of pins:
The shrouded box cables are nice in that they are polarized (i.e. you can only insert the cable in one direction).
You probably need to group the i2c reads so that you poll all 16 pins at a time, rather than polling each individual pin separately. If you have some left over digital input pins on the Teensy, you would probably want to use the interrupt pin from the MCP23017 to know when at least one of the buttons from the MCP has changed state.
The alternative would be to create your own PCB, but this probably take some amount of time to learn the tools and to wait for the PCB makers to send you the boards.
<edit>
I just recalled that the Tall Dog boards now have carrier rails on the sides. Even if you don't use it to bring out the underneath pads, you can use these carrier rails for providing power/ground/IO for all of the pins (you would to connect the three MCP's on a separate board -- and you probably need to think of adding pull-up resistors for SDA/SCL):