Help with Multi-Dimensional array

I assume that by buttons you mean normally open momentary switches.

I use hardware debounce on my button switches. A 0.1uf cap across the switch and that is it. If the 0.1uf cap doesn't debounce the switch properly the switch goes in the trash. I always wire my switches from input to ground with the internal pullup enabled.