Consider the case of having three arrays:
X = {A , B , C};
Y = {D , E , F};
Z = {G , H , I};
How to generate all the possible combinations from these three arrays ( C++ or Python ), that's like
C1 = {A , D , G};
C2 = {A , D , H};
...
C4 = {A, E , G};
...
C10 = {B , D , G};
...
...