@Yanan_Cao: Thanks for the pointers. These were very helpful. Using the type Any seems like a flexible way. It wasn’t supported in 1.4.x though.
I am defining my custom operator as varargs.
my::Customop(...) -> (...)

This seems to work to save multiple inputs and multiple outputs of different types. Is this a recommended way to represent an operator, or should I look out for any corner case?