the input array
the position to shift onto
if true then shift elements into the position rightwards, else leftwards (which is also the default)
if set to true then the array will be resized to exclude the now "empty" element
the value to place in the space where the last element shifted no longer occupies, by default this is T.init
the shifted array
Shifts a subset of the elements of the given array to a given position either from the left or right.
Optionally allowing the shrinking of the array after the process, otherwise the last element shifted's previous value will be set to the value specified.