At first glance, it looks simple to me.
1) Compute number of possible combinations
int combinations = 2 << ArrPattern.Length;
2) Use a loop to
combinations
to get all combinations
3) Within the loop, let the individual binary digits decide whether you use an actual word or an empty string.
for ( int i = 0; i < combinations; i++)
{
StringBuilder singleVariant = new StringBuilder();
for( int stringIndex = 0; stringIndex < ArrPattern.Length; stringIndex++)
{
if( (stringIndex & i) != 0)
{
singleVariant.Append(ArrPattern[stringIndex]);
}
else
{
singleVariant.Append(string.empty);
}
}
}
4) Add error handling, space stuffing, bug fixing, input, output, etc