How to have components containing arrays in ECS?

Hey so i have been having some trouble with the ecs system and arrays, hopefully someone will be abel to shed some light on this.

Basically i need to use arrays inside components in a project i am doing and they weren’t working as expected so i created a simple test project. Have a bunch of objects move following a set of commands defined inside an array. this would use shared component data because many of the objects would be doing the exact same actions. The component used can be seen below.

public struct MoveActions : ISharedComponentData {
        [Range(-90f, 90f)]
        public NativeArray<float> rotations;
        public NativeArray<float> distances;
    }

However i have struggled to actually access the arrays. If i use a normal array, when i pass the component into a job it errors because it should be a native array. If i use a nativearray(as you see above) it ends up being uninitialized and errors. My solution to that was to use a component data proxy like this:

 [RequiresEntityConversion]
    public class MoveActionsProxy : MonoBehaviour, IConvertGameObjectToEntity {
        [Range(-90f, 90f)]
        public float[] Rotations;
        public float[] Distances;

        public void Convert(Entity entity, EntityManager dstManager, GameObjectConversionSystem conversionSystem)
        {
        dstManager.AddSharedComponentData(entity, new MoveActions
            {
                firstDistance = FirstDistance,
                firstRotation = FirstRotation,
                rotations == new NativeArray<float>(Rotations, Allocator.Persistent),
                distances = new NativeArray<float>(Distances, Allocator.Persistent)
            });
    }

However once i use the component in a system the component appears to be empty and still gives me an error saying it is uninitialized.
Basically i have no idea what to do at this point and any help would be fabulous.

Though this is late, for others who see this in the future, Dynamic Buffers are the solution; Allowing you to store data through dynamic buffer components.