Fix set and swap at outer index issues

For both observed and unobserved arrays.

Splice truncates the start index to the array length. Swap and set do
not.