public static MjoType ElementType(this MjoType type) => type.Matches(MjoTypeMask.Array) ? type - 3 : throw new Exception($"Can't resolve element type of {type}");
public static MjoType Array(this MjoType type) => type.Matches(MjoTypeMask.Primitive) ? type + 3 : throw new Exception($"Can't create array type from {type}");