Entities for pens?
For performance, slices in components are not the best choice. They and up on the heap, and moving around components between archetypes is more expensive here, as special logic is required to play well with the garbage collector.
I do not know how the pens will be used, but it might be worth considering to implement them as separate entities, using entity relations to access them from herds. However, regarding performance it depends on some points whether this is the better decision:
- How many pens per herd do you typically expect?
- Will it be possible to do most of the logic of pens independently?
- How frequently do you need to access pens from the herd (i.e., not independently)?