I’ve figured it out!
Because the .csv file inside AE is already broken up there is absolutely no reason at all to create row/column arrays. This makes the code actually fairly straight forward. Posting it here for anyone that may run into the same challenge.
I also added a Slider Control to the .csv layer set to 999 and parented the .csv property “Number of Rows” to it. The reason is that this data doesn’t automatically update when more rows are added when the file is changed. Now it will always loop through the available max rows.
csvFile = thisComp.layer(thisComp.numLayers).name;
compName = thisComp.name;
csvLength = thisComp.layer(csvFile)("Data")("Number of Rows");
for (i = 0; i < csvLength; i++) {
stringvalue = footage(csvFile).dataValue([0, i]);
if(compName == stringvalue){
footage(csvFile).dataValue([2, i]);
break;
}
else {"Data Not Found";}
}