Config files why do they fail?

Pretty much save files in config .ini files is ending up always in fail. Like sometimes it won’t even save arrays I think that the best you can do is save everything instead of arrays simple variables any idea opinion or whatever ?