New Issue: should someArray.targetLocales() return a reference?

16873, “mppf”, “should someArray.targetLocales() return a reference?”, “2020-12-15T17:01:35Z”

The array.targetLocales() function invokes dsiTargetLocales() on the array implementation class. However, all of the implementations of this function return an existing array. Current array return semantics are that in this situation a copy of the array is made.

Should array.targetLocales() (as well as other targetLocales funtions and the DSI functions) be adjusted to instead return by const ref to avoid unnecessary copying?

I observed this issue while investigating #16872.