This is already separated per PBVH type, we can make use of that to simplify the loops for the types with the aim of sharing code in a simpler and more performance-friendly way. Ideally this could be written as `array_utils::scatter`, but we don't have that utility function now, so just write the raw loop for now.