Shared array of shared component data

I’m basically looking for the ECS approach to do something.

I’m making a 2D animation system and each component of “SpriteSheetData” is a shared component with different instances per unit. It stores things like the number of cells on a spreadsheet and cell height/width.

Importantly I have a struct called AnimationClip which contains the start cell, end cell, direction and speed of an animation, the cell numbers linking to sprite-sheet data. Now every instance of SpriteSheetData may contain multiple animation clips (walking, jumping, etc.)

So essentially I have a shared SpriteSheetData component between identical units, inside that I need a dynamic array of AnimationClips (currently just a struct but should this also be a shared component?)

So that if I have 2 say goblin enemies, they share the same SpriteSheetData and AnimationClip array, the only thing that needs to be different between them is the current clip, their own frame timers, and their current frame in the animation.

What’s the ECS way to set this up?

At the moment I have it set up like below

public struct SpriteSheetData : IComponentData
    {

        public int TotalCells;
        public int CellsPerRow;
        public float FrameTimer;
        public Vector4 uv;
        public AnimationClip CurrentClip;
        public AnimationClip[] animationClips;

    }

public struct AnimationClip
    {
        public AnimationDirection Direction;
        public int StartCell; // 0 based
        public int TotalCells;
        public int CurrentCell; // 0 based
        public int FrameTimerMax;
  }

I think optimally my AnimationClip[ ] and SpriteSheetData would be shared, and then a separate small component containing a reference to the current animation and the current frame/frame timers is correct? Unsure here