This is the best tutorial on arrays.
scirra.com/tutorials/307/arrays-for-beginners/page-1
It has pictures unlike the one in the manual.
Basically an array creates a 2D or 3D box where each square contains a value.
An array starts from a 0,0,0 (in this case you only need a 2D box, so you only need a X,Y, so yours will be 0,0)
So imagine your 10,10 grid, the first top left pixel should be a value at 0,0, the one on its right would be 1,0 and the one below that 1,1.
Store a value from 1-X (X being the number of colors you want in the palette) and make 0 white.
Make a every tick to check if eg. ArrayAt(0,0) value = 1. If it is, change its color to 1.
:) saving would be a piece of cake from there.