They are some type of spool, I bought them years ago from a Ben Franklin’s arts and crafts store (Wife’s idea, honest), if I remember right, they came in a little plastic bag with 12 or so per bag and they didn’t cost much.
I used washers behind some to space them out as needed with certain pistols and on a few I cut the lip of the spool off in some places to clear the front of the trigger guard, each pistol has to be lifted up from the muzzle then pulled out.
Some of the guns have been on the door for 7 years and I have yet to have any problems with wear on the pistols or have any (I don’t even want to say it) fall off, they fit very solid.
As far as your shelf, the shelf in my safe has an opening on the left side for very long rifles to go through it, you might be able to cut a small space out of your shelf for the barrel to come up through and save most of the shelf.