A really cheap way to store pots and frying pans is to hang them by their handles. For the pots, I first mounted a scrap board across the studs to provide a surface to secure the screws. Then add screws at the correct spacing for your pots.
For the lids, you just need a rail close to a wall or on a door that the lids can hang in. The handles on the lids will stop them from falling. I used some scrap 3/4 inch square wood for this, and cut two 1 1/4 inch ends, and the front rail to be the distance between two studs. I then drilled a hole lengthwise in the end pieces, and used long screws to mount from the rail, through the end piece into stud. The whole thing only sticks out 2 inches from the wall.