Array slice function with negative second argument