simple tetris script

ok, how about this;

can i make an array and then call back an integer from the array buy pressing the button?

so like an example:
this isint real code, but go with it...;

array is "ledarray[] 1-9"
and i make it so val is 0
and one button press makes val ++ by 1, and another button makes val -- by 1
and then i make "ledarray[val]"

can i make ledarray bring up the led value by the val?

and of course with a matrix, i would need to turn it into coordinates, instead of only left and right...