Cleanups in StructuredArray API and tests