begin array handling