I\'ve noticed that at several places in our code base we use dynamically expanding arrays, i.e. a base array coupled with an element counter and a \"max elements\" value.
There is sglib, which implements various lists,hashmaps and rbtrees in a generic fashion (i.e. by specializing over a type). There is also a fast sorting function for arrays: