Create array varable of TetrisGridPiece pointers:
TArray<TetrisGridPiece*> ArrayName;
And… thats it array is ready to go now you can use Add() or AddUnique() functions to place actor pointers, you can do that toghther with spawning if you wish:
ArrayName.Add(()->SpawnActor<TetrisGridPiece>(TetrisGridPiece::StaticClass()));
Here you got list of TArray functions:
Also not that TArray is not a pointer (but you can create pointer to array if you wish) so you use “.” insted of “->” to call functions
Edit: you know spawning and adding in same time might not be smartest idea… so treat it as a example