Passing float4 array to compute shader

I cant seem to figure out how to send a array of float4 value from my script to the compute shader, i removed the logic so that its easier to point out the array passing. These two scripts are responsible for generating a grass shader, and i wanted to implement a trampling effect which worked well for one float value but I wanted to add this for multiple objects so i needed an array. I have tried to make sure that the buffer sends the correct value and it seems like it but whenever i replace my singular float value to the array it just doesn’t work. I really hope someone can help me out.

Note: I have no clue what im doing when it comes to compute shaders, and these are just snippets of code stripped down to the parts of sending an array.

Snippet of how i tried implementing the array in my shader.compute:

#pragma kernel Main
#pragma warning (disable : 3571)

RWStructuredBuffer<float4> _TramplesBuffer;

int _TramplesBufferSize;
float4 _Trample;
float _TrampleStrength;

float4 GetTrampleVector(float3 pos, float4 trample)
{

    float3 trampleDiff = pos - trample.xyz;
    return float4(
        float3(normalize(trampleDiff).x,
               0,
               normalize(trampleDiff).z) * (1.0 - saturate(length(trampleDiff) / trample.w)),
        0);
}

// The main kernel
[numthreads(128, 1, 1)]
void Main(uint3 id : SV_DispatchThreadID) {
    float4 theoreticalPosistion;
    
    float4 t = _TramplesBuffer[0];
    //It works fine with using the value set by the cs script
    float4 trample = GetTrampleVector(theoreticalPosistion, _Trample);
    //But if i try to use the value from the buffer it does not work
    //float4 trample = GetTrampleVector(theoreticalPosistion, _Trample[0);
    theoreticalPosistion += trample * _TrampleStrength;
}

Here is a snipper of the controlling cs script:

using System;
using System.Collections.Generic;
using System.Runtime.InteropServices;
using UnityEditor.Rendering;
using UnityEngine;
using UnityEngine.Rendering;

[ExecuteInEditMode]
public class ProceduralGrassRenderer1 : MonoBehaviour
{
    
    [Tooltip("A mesh to crate grass from. A blade sprouts from the veenter of every triangle")] 
    [SerializeField] private Mesh sourceMesh = default;
    [Tooltip("The grass geomentry creating compute shader")] 
    [SerializeField] private ComputeShader grassComputeShader = default;
    [Tooltip("The material to render the grass mesg")] 
    [SerializeField] private Material material = default;
    
    [SerializeField] private GrassManager grassManager;
    
    //A state variable to help keep track of whether compute buffers have been set up
    private bool initialized;
    //We have to instantiate the shaders so each points to their unique compute buffers
    private ComputeShader instantiatedGrassComputeShader;
    private Material instantiatedMaterial;
    //The id of the kernel in the grass compute shader
    private int idGrassKernel;
    //The x dispatch size for the grass compute shader
    private int dispatchSize;
    
    //Trampling
    private ComputeBuffer tramplesBuffer;
    private Vector4[] tramplesArrayToSend;

    private void OnEnable()
    {
        Debug.Assert(grassComputeShader != null, "The grass compute shader is null", gameObject);
        Debug.Assert(material != null, "The material is null", gameObject);
        
        //If initialized, call on disable to clean things up
        if (initialized)
        {
            OnDisable();
        }
        initialized = true;
        
        //Instantiate the shader so they can point to their own buffers
        instantiatedGrassComputeShader = Instantiate(grassComputeShader);
        instantiatedMaterial = Instantiate(material);
        
        //Generate the values for the buffer
        tramplesArrayToSend = new Vector4[grassManager._Tramplers.Count];
        int r = 0;
        tramplesBuffer = new ComputeBuffer(1, 4 * sizeof(float), ComputeBufferType.IndirectArguments);
        foreach (var trampler in grassManager._Tramplers)
        {
            //Debug.Log($"r: {r}, itemslen {items.Count} inside: {items}, tramplerslen {grassManager._Tramplers.Count} inside {grassManager._Tramplers[0]}");
            tramplesArrayToSend[r] = (new Vector4(grassManager._Tramplers[r].position.x,
                grassManager._Tramplers[r].position.y + grassManager._HeightOffsets[r], grassManager._Tramplers[r].position.x,
                1)); 
            r++;
        }
        tramplesBuffer.SetData(tramplesArrayToSend);
        
        // Cache the kernel IDs we will be dispatching
        idGrassKernel = instantiatedGrassComputeShader.FindKernel("Main");
        
        //Set the buffer for the tramples in the computeshader
        instantiatedGrassComputeShader.SetBuffer(idGrassKernel,"_TramplesBuffer", tramplesBuffer);
       
        instantiatedGrassComputeShader.GetKernelThreadGroupSizes(idGrassKernel, out uint threadGroupSize, out _, out _);
        
        //dispatchSize = Mathf.CeilToInt((float)numSourceTriangles / threadGroupSize);
    }
    
    private void OnDisable()
    {
        //Dispose of buffers and copied shaders here
        if (initialized)
        {
            //IF the application is not in play mode we have to call DestroyImmediate
            if (Application.isPlaying)
            {
                Destroy(instantiatedGrassComputeShader);
                Destroy(instantiatedMaterial);
            }
            else
            {
                DestroyImmediate(instantiatedGrassComputeShader);
                DestroyImmediate(instantiatedMaterial) ;
            }
           
            //Release each buffer
            tramplesBuffer.Release();
        }
    
        initialized = false;
    }
    
    // This applies the game object's transform to the local bounds
    // Code by benblo from somewhere
    
    private void LateUpdate()
    {
        OnDisable();
        OnEnable();
        
        //Dispatch the grass shader. It will run on the GPU!!!
        instantiatedGrassComputeShader.Dispatch(idGrassKernel, dispatchSize, 1, 1);
        
        
    }
    

}