From your post above, the first case works. Even though you’re inputting a DataTree, it only has one branch so technically it is just a list.
For the second case, you will need to convert back to a DataTree before output. This will give your output data the same tree structure as your input data.
If you want a flat list, you can set the output to Flatten or if you want to flatten it in code you can use the DataTree.Flatten() method.
For the third case, you’re inputting a simplified tree (branches do not share a common “trunk”), so this needs to be handled specially.
Further explanation about dealing with simplified DataTrees here:
https://gist.github.com/piac/ef91ac83cb5ee92a1294
and here:
https://discourse.mcneel.com/t/treehelpers-with-simplify/92531
Edit - here is the gh definition from above:
re_trees_in_GH.gh (9.4 KB)
-Kevin