Change array items in a specific range