Getting item from List without a loop

Hello, I’m working on Loading and Saving for my game and I need to assign Materials back to GOs. I have a loop after loading that assigns the materials back to the loaded GOs using a list of Strings that is saved.

The for loop goes through the GOs and uses the Material list to assign mats using the String from the saved Materials names list.

But whenever the loop runs it uses the Material every material from the list, ending on the final material. Is there a way to get a Material from the list without using a Foreach Loop?

for (int i = 0; i < GOobj.Count; i++)
        {
            foreach (string matName in matNames)
            {
                foreach(Material matDB in this.gameObject.GetComponent<itemDataBase>().mats)
                {
                    if (matDB.name == matName.Trim())
                    {
                        plaster*.gameObject.GetComponent<MeshRenderer>().material = matDB;*

}
}

}
}
I just need to get the correct Mat from the list. I thought that the line
if (matDB.name == matName.Trim())
would make sure the correct Material is used and not all of them.
Does this make sense?
Thank you for any help.

How are the matNames related to the GOobj? If they are just matched by having the same index in their respective lists, then you want to remove the first foreach statement and compare matDB.name == matNames*. You might even make the GOobj a custom class and store the name on it so you don’t have a separate list you need to keep in sync. Just a suggestion, hope that helps!*