Make it so the grid of lights is in a grid of bools.
OK so now I can convert from row number to the right pin number, and from column number to the right pin number.

But the catch is the row and column numbers aren't like in math anymore. In math the indexes start at 1..N but here they start at 0 and go up to N-1. It's really annoying but whatever.

But so now I think if I make like a bigger grid of lights this should work I think. So that's good.