“a bunch of duplicated implementations or reimplementations of stuff like sorting and searching algorithms that already exists for on-heap structures but not off” Seems modern .NET is better. Specifically, these sorting and searching algorithms can operate on spans of values. It’s easy to allocate unmanaged memory with NativeMemory.AlignedAlloc, construct spans over that memory, and use the standard library on these spans.