Need a script for merging Layers with the same names

Doing a project where I need to combine different views of shoe parts into one layer for a mask! I've ran a script to re order the layers alphabetically and yes I can go through and merge them by hand. But I would love a script that will combine liked names layers. Does anyone have something like this made? I'd love for it to run on the layers I've highlighted (around 200). As I have more liked names layers I would like to stay separate. Any help would be greatly appreciated!
