Check the structure invariant.
Append a copy of the element x at the end of the array.
Get the array capacity.
Get the total ammount of bytes the elements consumes (capacity included).
Remove all the elements of the array and set the capacity to 0.
Insert an element preserving the array sorted.
Get the array size.
Access an element by index.
Get the pointer to the array's data.
Remove the first occurrence of the element x from the array.
Remove the element at position pos.
Change the current capacity of the array to new_capacity.
Dynamic array.
This is a simple dynamic array implementation. D dynamic arrays can't be used because they rely on the GC, and we are implementing the GC.