Implement basic persistent vector data structure