Sprint 1.2: Pre-sized array allocation with capacity tracking
Changed array representation from `value array ref` to capacity-tracked
`array_data` record for O(1) amortized push operations:
- Added array_data type: { values: value array; length: int }
- Added ensure_array_capacity with 3/2 growth factor (min 8)
- Added array_push helper for efficient append
- Optimized concat to pre-allocate and blit directly
Updated all array methods across 13 files:
- lib/quickjs/runtime/value.ml - New array representation
- lib/quickjs/runtime/interpreter.ml - Array element access
- lib/quickjs/builtins/js_array.ml - All array methods
- lib/quickjs/builtins/*.ml - promise, map, set, json, etc.
Tests: 176/176 runtime tests passing, 52,631/52,631 Test262 passing
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>