misc rework of array handling