For Sets, you can get away with the language slices and maps, which work sufficiently well.
I haven't found a need for trees in most of my projects and where I did I implemented it when necessary.
You can however, if you need to, separate the code and data of a tree by using a data adapter. The tree only stores a unique ID for an object which you can receive using the adapter, which would be a simple map or slice.
But as mentioned, I very very rarely needed them and not yet in any CRUD web project.
I haven't found a need for trees in most of my projects and where I did I implemented it when necessary.
You can however, if you need to, separate the code and data of a tree by using a data adapter. The tree only stores a unique ID for an object which you can receive using the adapter, which would be a simple map or slice.
But as mentioned, I very very rarely needed them and not yet in any CRUD web project.