Minecraft and Terraria use really advanced systems for their world generation: There's a couple of ways to go about creating a generator, but they all come down to relying on a random factor.
In Construct you could use something like "random(999999999)" to generate a random number, and parse it using TokenAt or TokenCount expressions as you like to change how the world may be built.
To really understand how to do this, you should read up on seed generation
, Construct's expressions
, and this page
specializing in random world generation.