Tensor-like types – with variadic shapes – that support both static and runtime type checking, and convenient parsing