You can get the same thing... simply name your items. There's no magic involved in the way mIRC does it internally, the keys are named manually just as you would be expected to do to achieve the same result. More importantly, however, if you don't care about the key names, you probably shouldn't be using ini files.
Note that if you *really* want to iterate through an ini file without the key names, see /help $ini, because it can do that. That would be for reading, not writing, of course.