unity – My shader is showing black constantly

I am procedurally generating a world. I want to apply a shader to each mesh, before i try textures i’m attempting to get it to work with colours.

So i have a struct which stores data about a type of terrain, including a list of colours (This struct is sytem.Serializable) & a material which has my shader attached to it.

I then have a monobehaviour which has 4 of these structs as public so the user can edit them. I have a public static class which contains 4 static versions of this struct and in the OnValidate function of my monobehaviour i set my static versions of the terrain data to equal the values on the monobehaviour.

So i now should have 4 static structs each with their own array of colours and material which is using my custom shader. I then do the following code directly after instantiating the mesh:

 protected void SetMeshMaterial()
 {
        //m_TerrainData is set to the values of one of the 4 static structs in the constructor of this class
        m_TerrainData.UpdateMaterial();

        m_Obj.GetComponent<MeshRenderer>().sharedMaterial = m_TerrainData.terrainMaterial;
 }

Update Material:

public void UpdateMaterial()
{
    Color() cols = regions.Select(r => r.colour).ToArray();
    float() heights = regions.Select(r => r.heightValue).ToArray();
    float minHeight = heightCurve.Evaluate(0);
    float maxHeight = heightCurve.Evaluate(1);

    terrainMaterial.SetInt("_NumOfColours", regions.Count);
    terrainMaterial.SetColorArray("_Colours", cols);
    terrainMaterial.SetFloatArray("_Heights", heights);
    terrainMaterial.SetFloat("_MinHeight", minHeight);
    terrainMaterial.SetFloat("_MaxHeight", maxHeight);
}

and my shader (Note this shader is just a placeholder I am using to get colours to display at the moment, it is not the final code):

Shader "Custom/ColourShader"
{
    Properties
    {
        _Scale("Texture Scale",float) = 1
        _TriplanarBlendSharpness("Blend Sharpness",float) = 1
    }
    SubShader
    {
        Tags { "RenderType" = "Opaque" }
        LOD 200

        CGPROGRAM
        #pragma surface surf Standard fullforwardshadows
        #pragma target 3.0

        const static int maxNumOfColours = 8;

        //Variables that must be set in material inspector
        float _Scale;
        float _TriplanarBlendSharpness;

        // Variables that must be set programatically
        int _NumOfColours;
        float3 _Colours(maxNumOfColours);
        float _Heights(maxNumOfColours);
        float _MinHeight;
        float _MaxHeight;


        struct Input
        {
            float3 worldPos;
            float3 worldNormal;
        };

        float InverseLerp(float a, float b, float t)
        {
            return (t - a) / (b - a);
        }



        void surf(Input IN, inout SurfaceOutputStandard o)
        {
            
            float height = InverseLerp(_MinHeight, _MaxHeight, IN.worldPos.y); //Get height between 1 & 0 
            
            
            if (height > 0 && height <= 0.25)
            {
                o.Albedo = _Colours(0);
            }
            else if (height > 0.25 && height <= 0.5)
            {
                o.Albedo = _Colours(1);
            }
            else if (height > 0.5 && height <= 0.75)
            {
                o.Albedo = _Colours(2);
            }
            else
            {
                o.Albedo = _Colours(3);
            }
        }

        ENDCG
    }
    FallBack "Diffuse"
}

None of the colours have a default value of black. Shaders really aren’t my strong point so i have no clue what is going wrong here.