fix(orderBy): fix mixed case arrays with refactoring

Refactored, removing redundant code while fixing mixed array sorting