Fix creation of string arrays from object types

Fixes issue #3398