abory - it isn't clear to me why you need to use cat or how you would link this with rand. Presumably, you wish to create randomly coloured squares and then patch them together. Rather than use cat and rand, I may do something like
numSqrsPerEdge = 8;
numPixelsPerSqrEdge = 25;
The above would give us an 8x8 square of squares, where each sub-square is 25x25 whose colour is randomly generated.
To generate any one sub-square, you could do randi as
sqrColour = uint8(randi(256,1,1,3) - 1);
subSquare = repmat(sqrColour, numPixelsPerSqrEdge, numPixelsPerSqrEdge);
You can use the above for each of the 64 (8x8) sub-squares, concatenating or (perhaps better) inserting each sub-square into an already sized 8x8 (or 200x200x3) array.