Init tree with array.