Do the Hats look the same or do they have different shapes and image perspectives. If the Hats are somewhat similar that if real you would attach the identical patch all hats. You can most likely create a mockup template for each different and perspective and use the patch you have and warp the layer to match the hats perspective in the mockup templates. If you need different text in the patch you would need a custom patch for the different content you have. The is no one patch shape and layout for all possible cont. You would need to use a smart object layer in your mock templates that would have its contents replaced with your various patch replacements for the various hat design. The Patch would need to change. I would design all the patches so the will have the same Aspect Ratio and Size as your orignal patch. That should not be hard to do. All you need to do is use layered PSD document the has a particular Canvas size that is empty transparent except for a 1% opacity pixel in the layers top left and bottom right corners to insure that layers created using these files layers will be the PSD canvas size. You build you patches in layers above ththe laye with thw two pizels. Soe tie will alwaye had a patch file the will be east to edit and change. Some Photoshop operations can trim images with transparent boarders and the resulting layer size will be the size of the image boounds ie the patch. The two pixels that human eyes will never will insure the the Patch layer size will be the PSD Canvas size.
To use 3D you will need to have, or make, a model of the hat. That is not a job for Photoshop. You will need a 3D application such as Blender. If you already have a model, then placing the badge would be easier in Adobe Dimension (or in Blender). Both will render much faster than Photoshop.
If you just want to use 2D, then put each element - the hat and the badge into a separate smart object and use Transform >Warp to put the badge onto the hat. You can add shadows in a separate layer. To change the logo ,or change the hat, open the smart object and replace the contents.