Subbing in numbers using a for loop


I am trying to sub in numbers in a for loop,

for example,

zz = [1 2 3, 4 5, 6, 12 28]

Then I would the first loop to sub in [1 2 3], the second loop [4 5] etc.

Is there a way this can be done in MATLAB.