https://github.com/jakubgorny47/baku-code/tree/master/c_vector
Here's my implementation. It's basicaly a struct containing pointer to the data, size (in elements), overall allocated space and a size of the type that's being stored in vector to allow use of void pointer.