Shifts the first value of the array off and returns it, shortening
the array by 1 and moving everything down. If there are no elements
in the array it returns 0.
Returns an array where the first element is the shifted value and the
second element is the modified array.