you do something like without overloading operator
if (Available.Num() == -1)
{
Available = AllTransforms;
}
int32 randomIndex = FMath::RandRange(0, Available.Num() - 1);
FTransform result = Available[randomIndex];
Available.RemoveAt(randomIndex);
return result;
have a return type of function FTransform
hope it helps
cheers!