convert array to BST