is there a generic approach to arranging into a matrix?
Yes, it is a matrix with rows and columns as many of each as you need.
At each rows and columns intersection there is a switch and series diode.
You drive the rows high (output pins) and read the value from the columns (input pins). There is a pull down on each input so that if the switch is not pressed then that input looks like a zero, if it is pressed then it looks like a one on that column input when the appropriate row is driven high.
At any moment you know what row you are driving high so you know what switch each column corresponds to. Looking at each column for every row being put high in turn constitutes a scan of the matrix.
Look for my schematic here on an 8X8 http://www.thebox.myzen.co.uk/Hardware/Econo_Monome.html
or here for a 4X4 http://www.thebox.myzen.co.uk/Hardware/Mini_Monome.html