I don’t think there is a way to cast an entire array’s contents easily. You could try this method, though:
TArray<AActor*> ActorArray;
TArray<ASomeActor*> SomeActorArray;
UGameplayStatics::GetAllActorsOfClass(GetWorld(), ASomeActor::StaticClass(), ActorArray);
for (AActor* UncastedActor : ActorArray) {
SomeActorArray.Add(Cast<ASomeActor>(UncastedActor));
}
// SomeActorArray is now an array of ASomeActor.
Beware, don’t run this every frame as it is somewhat expensive to run.