112 switches need reading

thanks for the advice. I suddenly realized that I can arrange the 112 as a 7 x16 array , read it with an Arduino and send the data to the main Mega... I am sure that the code to read an array is in a library... anyone know where I could look for this? The switches are all fully floating so making them as an array is simple.
thanks