In AvlArray, change pointers from T* to shared_ptr<T>