localindexes() in shared array to only refer to workers by default

Closes #8913