How does TArray keep references? My custom container is getting it's elements garbage collected

Good thing to know I wasnt the only 1 with this issue, so from what I understand I cant use TARRAY for referencing custom types; in which case I have to use AddReferencedObjects container.

How would I go about using it for something dynamic like this: