Again it looks like you are trying to write code. Where are the steps for #4?
I'd expect something like this:
begin loop to work on a row
do things needed for this row
begin loop to work on the columns for this row
compute location for next shape
get color for next shape
create shape using color and location
save shape in list
end loop for columns this row
end loop for rows