Is that correct? And what about the rest of my logic, as far as I can tell from what you are saying here it is correct.

You might be correct, but it's hard to tell

I think that you are over-complicating the process because you are new to arrays and how to use them.

Take a step back, and describe for us exactly what it is you are trying to do. We can suggest a solution which might include arrays. Or it might not!

For example, after understanding what you want to do we may well suggest that you would be better off writing the data directly to an INI file rather than storing it in an array.