Implementation of a vector and hashmap in C