For that you can get the required index by using a for loop on the retrieved values
Listitem.fields
And then use if condition to check the fieldname currentitem.DisplayName.Equals("Requiredname")
And on then side use the assign as needed
Or you can directly use this in assign
ListItem.Fields.Where(function(x) x.DisplayName.Equals("Display Name of Field"))(0).Value = "Value to be updated"
instead of displayname use name if you want to use the backend names of the fields
Cheers