vec: make unsafe indexing functions higher-level
add new vector representation as a library
hashmap: port to Vec<T>