I'm super curious how you managed that bit.
I've managed it only because the solution was already laying in front of me thanks to the two nodes I've made before (lucky!

). Still took me three full days to grasp it.
In a nutshell, there are three key aspects to this node:
1) You need to generate a gradient that is able to run in different directions basing on some "angle" parameter. At first, I thought that this would be the most difficult part. Surprisingly, it was the easiest part as there are already some great solutions for gradients on Share that worked perfectly well.
Initially, I was looking for a way to generate the gradient that would run from black to white for each tile in the mask right away. Somehow I figured that it's more important to actually HAVE a gradient, and it would be more productive to look for a way to maximize its range in a separate step.
2) You need a variation map to drive gradient angles. This one was covered by the
Randomize Mask node I've made earlier.
3) You need some kind of Auto Levels functionality to maximize the gradient's dynamic range for each individual tile.
The problem with "vanilla" Auto Levels shipped with Substance Designer was that it can work on a "macro" level only, so it would level out an entire image. It would remap it to a new range in a way that would make the darkest pixel in the image the "new black" and the brightest one would be the "new white". Unfortunately, this wouldn't be helpful for our case.
Here the
Auto Levels Plus node comes into play. It was implemented through the Pixel Processor, so it can work on a "micro" level, i.e. on a per-pixel basis. The node uses a specific math formula to remap each pixel to a new range of values. However, it is required to be supplied with two values to work correctly: one that would define the "old range minimum" and one for the "old range maximum". In our case, that would be the darkest pixel in a gradient and the brightest one.
As the Auto Levels Plus node works on the per-pixel basis, it can level out individual tiles in the mask to a common new range if supplied with correct data. From here, we need to get the "old minimum" value and the "old maximum" value for each tile in the mask, then store them in two additional "data" maps to provide the Auto Levels Plus function with this values for each pixel processed. The important thing here is that such values should be exactly the same throughout the individual tile in the mask, so the entire tile would be remapped to a new range using the same data.
From here, the
Randomize Mask node comes back into play. The key feature of this node is a function that can spread (propagate) brightest pixels sampled in the tile throughout the entire tile without crossing its borders. Using this function, we can find and store in a map maximum values of gradients that run in each tile. This will cover half of our needs for the Auto Levels Plus function. In a similar manner, we can sample for the darkest pixels in tile's gradients and store them in a map as well.
At this point, we have everything we need to auto level individual tiles with random gradients to their maximum range (for example, 0-1, or black-to-white). The Auto Levels Plus function would take the mask with gradients as the main input and two data maps as additional inputs. The function will sample each pixel in all three maps and use appropriate values to remap main input pixels to a new range using the math formula.
Basically, that's it. See the image attached for a visual guide.
Fun fact: working on this node I've detected a couple of shortcomings in the Auto Levels Plus node itself. Fixing them made the node 10x-30x times faster than the "vanilla" Auto Levels (was so-so). Double profit.