Logical problem involving arrays

Still not sure what you're saying - an array is a variable.
Are you saying you need a two dimensional array?

If you store it as an int, you can infer any leading zeroes, and any trailing or infix ones will be explicit.