In my #8489 we want to use boost's small_vector type, but that PR is
kinda messy by adding boost and also making a meaningful change. So
here I'm splitting out the boost addition to its own PR so that one can
be more focused on the allocation improvement and consumption of boost.