In the browser, you can make pre-allocated, fixed-length, typed arrays. For example Float32Array, Uint8Array etc. These are quite fast to access once created since no new memory is used.
They’re probably less useful in the context of a Nostr client which deals almost exclusively in string data, but yes, if you can use them it’s a great way to go.