allocate array on stack