drules=Sequence@@Der[a1 Ar[2,1]+a2 Ar[1,2]]

k0 = Length[ins = First /@ {drules}]

ins

k0 = Length[ins = Take[ins, 1]]

outs={};
For[k=1, k≤Length[ins], ++k,
AppendTo[outs, newout=Der[drules][ins[[k]]]];
ins = ins ~Join~ Complement[
Union[Cases[{newout}, Y[ijk___, _] :> Y[ijk, 1], Infinity]],
ins
]
];
--k;

Print /@ Thread[ins -> outs];

Print /@ (Thread[
Table[s[i], {i,Length[ins]}]==(ins /. Y[ijk__, _] :> Y[ijk])
]);

Print /@ (Thread[ins -> outs] /. Y[ijk__, h_] :> h Y[ijk] /. Thread[
(ins /. Y[ijk__, _] :> Y[ijk]) -> Table[s[i], {i,Length[ins]}]
]);

zero=Table[0,{k}];
e[{{i_}}] := ReplacePart[zero, 1, i];
mat = Replace[
outs /. Y[ijk__, h_] :> -h e[Position[ins, Y[ijk,1]]],
0 -> zero,
{1}
];

mat // MatrixForm

ReducePrimitives[Take[SH[MatrixExp[mat /. {a1 ->1, a2->1}]].ins, k0]]

expmat=SH[PowerExpand[MatrixExp[mat]]];

Union[Cases[expmat, Sqrt[y_] :> y, Infinity]]

PowerExpand[Eigenvectors[Transpose[mat]]] // Simplify // Transpose // MatrixForm