Hello Pooja, storing chopped onions effectively is a very common challenge because the volatile sulfur compounds responsible for their characteristic aroma easily permeate thin or porous plastics, while trapped moisture accelerates bacterial softening and decay.
To answer your first question regarding container materials: an airtight glass jar with a secure gasket seal, such as a standard mason jar or a glass snap-lock container, is by far the most reliable option. Glass is completely non-porous and chemically inert, meaning it will neither absorb volatile sulfur compounds nor allow them to diffuse out into your refrigerator. In contrast, standard polyethylene and polypropylene food containers have microscopic porosity that permits gas exchange over time, which explains why your current plastic boxes allow the smell to escape.
Regarding your second question: yes, lining your container with a dry paper towel is an excellent and scientifically sound technique. Cut onions naturally weep moisture due to ruptured cell walls, and temperature fluctuations inside the fridge cause condensation on the inner walls of the container. Placing a folded dry paper towel at the bottom, and optionally another sheet on top before sealing, absorbs this excess liquid. Keeping the ambient humidity moderate prevents the onion pieces from sitting in moisture, which is the primary cause of sliminess and rapid spoiling over a 4 to 5 day period.
Finally, freezing pre-chopped raw onions is exceptionally practical, particularly for cooked applications such as curries, stews, and stir-fries. When onions freeze, the water within their cells expands and breaks the cell walls. While this destroys their crisp raw texture, making them unsuitable for fresh salads, it actually works to your advantage in cooked dishes because they release moisture faster and soften more quickly in hot oil. For best results, freeze your chopped onions in a single layer on a parchment-lined tray before transferring them to a heavy-duty freezer bag. When you are ready to cook, add them directly to the hot pan without thawing first to maintain the best flavor and texture.