How can I read an large array of switches with some microcontroller?
For your example of an 18x16 matrix, you will need a maximum of 34 GPIO lines.  One side will be configured as push-pull outputs, and the other as inputs.

Here is a smaller matrix as an example:



We will use the columns as inputs, and the rows as outputs.  Initially set all of the outputs low.

Configure the column inputs to use internal pull-down resistors, or supply external ones (e.g. 100K).

When reading the matrix, one by one change one of the row pins high.  Then look at the column pins, and see if any are high instead of normally low (due to the pull-downs).

For example, if SW2 is enabled, then Col1 will be high only when Row2 is high.

The diodes prevent feedback when multiple switches are thrown (thanks, Tut).

You can save another 12 pins by using a 4-to-16 line decoder such as the 74HCT7514 to drive the row outputs, so now you need just 22 GPIO pins to read the 288 switches.