Filtering out the arrays depending on each other in the same result set

Is this extension of Partition the result set and create multiple arrays