Gonna start off by saying this is decidedly not a beginners topic, and that there are so many different ways to do it you're not going be finding a tutorial or template that will walk you through exactly the way you want it.
Also, as far as game design goes, hand crafted levels are going to be superior to randomly generated ones 99% of the time, for much less work. I highly recommend building the rest of the game first, using a sample /example handcrafted level first, as the "fun-ness" of your game should not be dependent on procedural generation. When your core game is ready, you can add procedural generation of levels afterwards. By doing this, you'll also have a much clearer scope of what exactly you need your procedural generation to do.
Here are a few resources:
The closest thing I can think of from your description would be levels similar to Dungeon of the Endless: youtube.com/watch
gamasutra.com/blogs/AAdonaac/20150903/252889/Procedural_Dungeon_Generation_Algorithm.php
squidi.net/three/c_procedural.php