I wrote a huge ranty reply, but deleted it because it leads OT. Basically, read up on the link to ECS in the sibling comment. Also, definitely check out "Data-oriented design". There's a talk by Mike Acton on Youtube. "Where there's one, there's many" is a pretty basic but super important insight.
I consider this to be important to code maintainability at least as much as to performance.
I consider this to be important to code maintainability at least as much as to performance.