This function converts an array to a SentinelArray. It requires that the last element array[$-1]
be equal to the sentinel value. This differs from the function asSentinelArray which requires
the first value outside of the bounds of the array array[$] to be equal to the sentinel value.
This function does not require the array to "own" elements outside of its bounds.
This function converts an array to a SentinelArray. It requires that the last element array[$-1] be equal to the sentinel value. This differs from the function asSentinelArray which requires the first value outside of the bounds of the array array[$] to be equal to the sentinel value. This function does not require the array to "own" elements outside of its bounds.