I would do it something like this:
ClearAll[Interweave]
Options[Interweave] = {"WeavePattern" -> Automatic};
Interweave[a__List, OptionsPattern[]] :=
Module[{pat, lsts, len, cur, tooshort, s},
lsts = {a};
pat = OptionValue[Interweave, "WeavePattern"];
If[pat === Automatic, pat = Range[Length[lsts]]];
len = Max[Length /@ lsts];
Table[
tooshort = MapIndexed[If[Length[#1] < i, First[#2], -1] &, lsts];
pat = DeleteCases[pat, Alternatives @@ tooshort];
s = First[pat];
pat = RotateLeft[pat];
lsts[[s, i]]
,
{i, len}
]
]
So testing out:
Interweave[
{2, 4, 6, 8, 10, 12, 14, 16, 18, 20},
{3, 5, 7, 9, 11, 13, 15, 17, 19, 21}
]
{2, 5, 6, 9, 10, 13, 14, 17, 18, 21}
and:
Interweave[
{2, 4, 6, 8, 10, 12, 14, 16, 18, 20},
{3, 5, 7, 9, 11, 13, 15, 17}
]
{2, 5, 6, 9, 10, 13, 14, 17, 18, 20}
and with three arguments:
Interweave[
{2, 4, 6, 8, 10, 12, 14, 16, 18, 20},
{3, 5, 7, 9, 11, 13, 15, 17, 19, 21},
{a, b, c, d, e, f, g}
]
{2, 5, c, 8, 11, f, 14, 17, 18, 21}
and with three arguments and a weave pattern:
Interweave[
{2, 4, 6, 8, 10, 12, 14, 16, 18, 20},
{3, 5, 7, 9, 11, 13, 15, 17, 19, 21},
{a, b, c, d, e, f, g},
"WeavePattern" -> {1, 2, 2, 3}
]
{2, 5, 7, d, 10, 13, 15, 16, 19, 21}
Feel free to use the code
it could definitely be optimized a bit