Just make your "node" be elements of a UDT array. Then each "node" can hold array indexes of its parent and sibling nodes.

If the DOM has to be able to grow (this sure seems like the same benighted attempt to create a massive JSON DOM... for "reasons" undisclosed) then just manage array resizing in chunks as you would for any large growable/srhinkable array.