Complete working version of array to BST