Create cubes according to objects array