How to spawn object in tilemap grid (Match-3 mechanics)

I want the objects to be arranged as follows, and they could only be moved horizontally, the grid is visible here

So how can you correctly spawn objects so that everyone is in their own cell, without using a tilemap?