Not sure how to store a tree like structure

Hold pointers to UObjects;
UObjects can hold pointers to other objects, so then with them is easy to achieve the tree behavior you want.