Tree on array

Transforms nodes into indexes.