ptg: use SmallVector for elements

The elements in each vector are uniqe and are not deleted, so there's no
reason to have it as a set
fix hash function
fix gep