[PM] Use a SmallVector instead of std::vector to avoid heap allocations