language: Clean up allocations (#36418)

- Correctly pre-allocate `Vec` when deserializing regexes
- Simplify manual `Vec::with_capacity` calls by using `Iterator::unzip`
- Collect directly into `Arc<[T]>` (uses `Vec` internally anyway, but
simplifies code)
- Remove unnecessary `LazyLock` around Atomics by not using const
incompatible `Default` for initialization.

Release Notes:

- N/A
e1d8e3bf6dtidely committed on 8/18/2025, 3:58:12 PM· committed by GitHubparent768b2de
2 files changedLine totals unavailable