ULandscapeComponent should have all things you need:
This is probably what would be interested the most
And here is example of how to generate UTexture2D:
Alternaticly, since you want to do some algorithm, you could use normal multi polygonal plane and use world displacement in material shader, not sure if you could use landscape for it too. This would make your generation done in GPU, ofcorse if it’s not too heavy