A function that removes/returns all array items after the first instance of a value, and a function that removes/returns all array items after the last instance of a value