AddUnique || TArray<FTransform>?

Can i use this instead of do/while loop which is freezing the engine? Issue Link i posted mygamemode please check what i a doing wrong in the code