The Internet?
Sorry for facetious reply but there are many sellers of custom foam on the web who cut to your exact requirements. A few years ago I purchased a roll of 1m wide 1cm thick closed cell foam from the well known auction site to re-line my pistol case which I also used as backing foam for my bow hard case (before switching to a backpack). The closed cell stuff is stiffer than the standard squidgy stuff.
The site in question doesn't keep purchase history forever but I'll see if I have a record of the seller.