Randomize Array of FTransform and compare if the elements are duplicated C++?

I mean instead of having an array of FTransform, have an array of FVector, and in your get all transforms function just do GetComponentLocation instead of GetComponentToWorld. If you’re not planning to use the rotations or scales of the components then you don’t need the transform really, location should be fine

FVector does have the == operator overloaded as well, so Contains will work out of the box, and you can easily write a shuffle function after that, similar to this post. Once you have the shuffled locations, then you just iterate through them using a for loop and spawn what you want to spawn

To be honest I don’t see why the shuffle method wouldn’t work on the FTransform array as well.