DynamicArray: Add reverse method