I stuck to the approach of dividing it by "sections" and creating each section randomly like you suggested, but took a different approach on the hallway generation and how sections connect to eachother.
I declare two small arrays I use for creation purposes besides the big array containing the actual map.
#define mapsize 256 //65536 tiles in total
#define macrosize 8 //64 sections in dungeon (rooms with hallways)
#define microsize 32 // 1024 tiles per section
//mapsize must be macrosize*microsize
int map[mapsize][mapsize][2]; //floors, walls/doors/funriture/etc...
int macromap[macrosize][macrosize][4]; //zonetype, roomtype, prevx, prevy
int micromap[microsize][microsize][4]; //tiletype, ???, prevx, prevy
"map" is to store my final map, and has two levels. One for floor tile info and one for objects/walls above the floor.
"macromap" is used to decide how secctions connect to eachother
"micromap" is not necessary but it makes creating each section easier and faster
-First I use a modified version of my maze generator to fill in "macromap" that will control what sections connect to which and in what order.
-"micromap" will be reused alot (each time I generate a new section). I place a room randomly in micromap, create a random door on one of the four walls of the room, and then create hallways filling up the rest of "micromap" using a different modified version of my maze generator (starting from the room door). Then I place all that section information in the cuadrant it belongs in the big map and re-use micromap for another section.
-Last I connect the different sections (independant room & maze hallway sectors) acording to the information in "macromap".
Feel free to take a look at my old "maze generator" video in my first post. Note that macromap and micromap are generated with different modified versions of my old "perfect maze" algorithm. It is called perfect maze because if you choose any two points in the maze there is one (and only one) path to get there. If you are interested in how it works the concept is quite simple and I will be happy to explain.
Also, my big map is not actually an array of simple integers, it is an array of a custom struct that contains different tile information along with visibility, transparency, and passability flags for my other algorithms I am working on (custom tile sets, line of sight and pathfinding).