Mutiplexing (matrix) is the easiest and most commonly used solution. You need just 32 pins (16x16) - if you don't have that many, that'd be a two PCF8575 or MCP23017 port expanders if you prefer I2C, or four shift registers. All switches are individually identifiable this way.
If you really don't want to multiplex:
- 8 PCF8575 and 8 MCP23017 port expanders (each set can handle 128 switches - no more of each as you run out of I2C addresses).
- 32 shift registers (it should be possible to daisy chain that many but you may run into scaling issues).
prokiller1800:
hi, the goal is to only drive 2 to 4 wires through a long distance.
Are those switches close together but far away from the Arduino? If so, a second Arduino may be the solution. It reads the switches locally, then sends the data over your long line (RS485 is an option indeed) to the other processor.