Could you clarify that a little more I'm not sure I understand.
How do you traverse a 1-d array?
//set a constant called MAX_SIZE (you already have this, 2 of them actually)
//create an array with MAX_SIZE elements (you already have this as well)
//for an index variable with values [0, (MAX_SIZE-1)] {
/*...you may perform actions here...*/
//access the array element and set it to a value
array[index] = value;
/*...you may perform other actions here...*/
//end loop
}
Take that and see if you can extrapolate it to a 2-d array (your shape array)...