create to_sorted_array method and add a second bst_well_formed2? method which uses the to_sorted_array method to check if the bst is well formed