Converted Tree to array