Use memset to fill! floating-point arrays as well

Instead of checking whether `x`, when converted to `T`, is equal to zero, check whether its bit pattern consists of all zeros. In this way, `x` can have any type, including floating point.