This script creates a grid made with comps. You can adjust the main values:
- Frame rate.
- Amount of rows.
- Amount of columns.
- Tile size (the square size of the duplicated comps).
- The duration of the comp (in seconds).
- The margins (to add some margin between the limits of the comp and the grid).
Just import in After Effects as a common script by selecting File > Scripts > Run scripts. It will create 2 comps, the main and the "tile", that will be duplicated within the grid.