Optimized append for array