A generic Tree structure made in Delphi is freely available at this GitHub repository:
See the readme at GitHub for details and updated documentation.
This small class allows creating hierarchical structures where each “node” is a small object (20 bytes plus your own data size), containing a property of your desired type.
For example, a Tree of string nodes:
var MyTree : TNode<String>; MyTree.Data :='hello';