C# Unity how to select only one item in an array and deselect other items

I have gameObject array that I’m looping through to animate the material with a delay for each gameObject. I am using a Coroutine in order to use WaitForSeconds and a for loop inside of it to add a delay for each object.

What ends up happening is all the objects in the array gets selected therefore the animation happens to all of them instead of just one object at a time

What I’m looking for, only the cube selected at the index to change color and to revert color once its not selected at index any more. Then after a delay of 0.3 seconds it selects the next one (so all the previous cubes to revert back the color)

How can I achieve that?

public GameObject[] laneMat;
float duration  = 6f;

void Start()
    {
        StartCoroutine(matColorLerp( .3f));
    }

IEnumerator matColorLerp( float delay)
    {
       ;
         for (int i = 0; i < laneMat.Length; i++)
         {
             
             laneMat*.GetComponent<Renderer>().material.color = Color.Lerp(originalColor,* 

startColor, Mathf.PingPong(time, 0.5f));
yield return new WaitForSeconds(delay);

}

}
}

Code not tested:

IEnumerator matColorLerp(float delay)
{
     for (int i = 0; i < laneMat.Length; i++)
     {
          Material material = laneMat*.GetComponent<Renderer>().material;*

Color startColor = material.color;
Color endColor = Color.red; // change for desired color
for(float t = 0 ; t < duration ; t += Time.deltaTime)
{
float progress = Mathf.PingPong(2 * t, duration) / duration;
material.color = Color.Lerp(startColor, endColor, progress);
yield return null;
}
yield return new WaitForSeconds(delay);
}
}