The way to store baking trays and tins without rusting is to make sure they are completely dry before putting them away in a moisture-free cupboard. Metal trays put away still damp, especially when stacked right after washing, quickly develop rust spots from the trapped moisture between them.
Leaving trays inside the oven might seem convenient, but the next time the oven heats up, a forgotten smear of grease on the tray can smoke or smell, and thin metal trays can slowly warp from repeated heat exposure.
Storing trays upright rather than flat also removes the need to lift every piece above the bottom one just to pull it out.
Do glass baking dishes need different storage from metal trays?
Glass baking dishes are more vulnerable to impact than metal trays, so they should never sit directly under or over a metal tray — a cloth or sheet of paper should always separate them. Sudden temperature changes can also crack glass, so a hot dish straight from the oven should never land on a cold surface or go directly into the fridge; letting the dish cool on the counter for a few minutes first removes most of that risk.
The lids that come with glass dishes are usually plastic and not oven-safe, so they should be reserved for fridge and freezer storage only, never the oven.
How should metal trays and tins be stacked?
Placing a thin sheet of paper or cloth between stacked metal trays cuts down on both scratching and trapped moisture. Where possible, standing trays side by side in a divided vertical rack helps them dry faster and stops them from scraping against each other when pulled out of the cupboard.
Standing different-sized trays side by side is safer than nesting them inside one another; trays nested together tend to scrape against each other when pulled apart, which can damage the surface coating.
How should silicone moulds be stored?
Folding silicone moulds for storage can leave permanent creases over time, and those creases can show up as marks on whatever is baked in them, so it is better to store them flat or loosely rolled. Silicone moulds also need to be dried thoroughly after use, or moisture and odours can build up in their folds.
With more than one silicone mould, a thin sheet of paper between them stops them sticking together and losing their shape; stored somewhere warm, silicone can also soften over time and lose its original form.
Is it a bad idea to store trays inside the oven?
The inside of the oven might look like a handy storage spot for trays, but every time the oven heats up, the tray heats up with it, and an invisible film of grease left on it can smoke or give off a smell. Thin metal trays can also warp slightly over time from repeated exposure to high heat.
A tray forgotten inside during preheating can carry the smell of the last dish into the next one, so the oven's interior should really only be occupied while it's actively being used.
In short
The rule for keeping baking trays and tins rust-free and warp-free is to dry them fully before putting them away and add a protective layer between them when stacking. Silicone moulds should be stored flat, and metal trays belong in a cupboard, not inside the oven. Glass dishes need their own spot, protected from impact.