arrays: add documentation for dynamic array
arrays: switch dynamic array resizing after a pop to using realloc