Doc AI
The example provided, doesn't seem different in all ways to me. It is just missing the generation part you want for the obstacles. The rest of the example is a very solid example of how to achieve the mechanics for a game like you want to make.
So, how to generate the obstacles?
You could create them at runtime based on predefined patterns. How you would like to create these patterns an randomize them a bit is up to you. You could indeed create these patterns in an array using numbers to define which animation frame to use at which spot or to set a tile in a tilemap.
Randomly creating objects won't work, because there are rules and patterns to take into acount. It might not be easy to get the result you'd like and will almost certainly take a lot of trial and error.