StructList
StructListX is a value type that holds the first X elements in stack before anything is allocated from heap.
StructList4<int> list = new StructList4<int>();
list.Add(5);
list.Add(2);
list.Add(3);
list.Add(8);
Elements can be converted to array.
int[] array = list.ToArray();
StructListSorter sorts StructLists without heap allocation.
var sorter = new StructListSorter<StructList4<int>, int>();
sorter.Sort(ref list);