Help me understand this type conversion rule

Adding a number to a string returns a vector of double values, which is expected:

>> ch = 'A', ch += 1
ch = A
ch = 66

The in-place incrementing causes the type to become double instead of char.

The useful but inexplicable behavior is that using a boolean index causes the original type to be retained, and this is true even if all elements are modified:

>> ch = 'A', ch(isalpha(ch)) += 1
ch = A
ch = B

How did it know the original type even if all elements of the input were being added numerically, and how is that different from the previous case? Is the += operator no longer an in-place operator in this context?

I realize what is happening, and this seems to hold for all index operations like ch(:) += 1 not just boolean ones. The equivalent code seems to be

tmp = ch(index)  # copy the specified values 
tmp += 1  # in place, converting to double
ch = tmp  # copy back to original, casting again

Is it the case that a copy is made for A(:) += 1 but not for A += 1, and that there are two casts in the sequence?