Refactor - Reversing an array without using a new array