array creation optimization