Array to Binary tree implementation