This function removes an element from the beginning of an array.