Let $\ f_n:\mathcal P\rightarrow\mathbb C\ $ be arbitrary for $\ n=1\ 2\ ...\ $ Let $\ \sigma(x)\ $ be the square-free part of $x,\ $ and $\ \rho(x):= \frac x{\sigma(x)}.\ $ Then define:
$$ F(x)\,\ :=\,\ \prod_n\ f_n(x_n) $$
where \begin{eqnarray} y_0\ &:=&\ x \nonumber\\ \forall_{n=1\ 2\ \ldots}\quad x_n\ &:=& \sigma(y_{n-1}) \nonumber\\ \forall_{n=1\ 2\ \ldots}\quad y_n\ &:=&\ \rho(y_{n-1}) \end{eqnarray}
This is a pretty general thing (possibly just general?).