One of our "safes" is one of the less expensive Sentinel sheet metal cabinets we bought when we saw it on clearance after hunting season one year at Wally World, at a price we couldn't resist. The foam stick-on gun braces were worthless, but I happened to spot a garden tool wood hanger rack in the garden department about a week later. I cut it to size and mounted it in this gun cabinet. I drilled additional holes for the dowel rods to fit the spacing I need for rifles/shotguns. Don't know if they still sell these, haven't looked. It's a strip of wood pre-drilled with peg holes & pegs, meant for hanging garden tools but with proper spacing makes a great gun rack. It was so long I was also able to make a gun stand to hold long guns I had out of the safe for cleaning, etc. Just had to cut to size, got 2 good pieces out of it. Of course you could make the same yourself with 2x4' and dowel rods cut to appropriate length, and drilling angled holes. The dowel rods can also be used to hold pistols by the barrel, I got this idea from an old photo of a Hollywood studio gun prop room, in which they had hundreds of handguns all mounted by the barrel on wooden dowel rods. The wood won't damage the barrel.
I find it to work well, especially to prevent firearms from falling around as mentioned by Doc above.