Rectangles following a path

Hi

I am triying to create some rectangles following a path. I would like that those rectangles have a random location but next to each other. I have done something similar but rectangles are touching each other and is just a grid of rectangles disordered. I place some images that would explain mi idea.

This is what I have try:

and this is what i am looking for:

02

I would need to implement in the definition that my rectangles could follow a path and also that could be together but just touching each other

Thanks in advance

Hey¡ ifound the way to make those rectangles follow a path…but i cant figure it out how to manage to place them next to each other in order to dont be overlaid