I think I found out a bit about scalar_t.
So I think that all arrays should be defined with scalar_t and AT_DISPATH_ALL_TYPES defines that scalar_t can be any type and should be checked for any array. If instead of ALL_TYPES are AT_DISPATCH_FLOAT_TYPES scalar_t is only checked against floating types. What is used if you only have integer types I have no idea.