Mmm, that’s not really how objects work. Objects don’t have variable numbers of properties. If your end goal is that example you provided, then that’s not a good format for variable data. Meaning, if one machine can have multiple “Local Admins,” PowerShell can represent that in an object, but it becomes hierarchical data. You can’t represent hierarchical data in a flat file.
Think of an Excel sheet. If you were to do this in an Excel sheet, how would you put multiple values into a single cell for “Local Admins” on one machine? Maybe you’re thinking, “oh, I’d just do like commas between them,” and that might be fine for you as a human, but it’s a sucky data format for computers to deal with. That’s why computers have relational databases instead of doing everything in CSV files or Excel sheets.
So what’s the end goal, here? What are you trying to get to?