Add return statement to slice_array and mask_array assignment. Closes PR20614.

This patch just adds the required return statements to slice_array::operator=
and mask_array::operator=.

Tests were added to check that the return value is the same as the object assigned
to.