Hello, you can use the GetAllActorsOfClass located in UGamePlayStatics. However with this method you won’t be needing the push function.
For example:
TArray<AActor*> AllActors;
UGameplayStatics::GetAllActorsOfClass(GetWorld(),AActor::StaticClass(),AllActors);