You could have tables-of-refs-to-objects, e.g. allInts:@seq[int], allFloat:@seq[float], and NaN tag the indices to those lists; it would require one more redirection to actually get the value, but would otherwise work well with any gc.
Also, subnormals (neƩ denormals) are also useful for tagging. And unlike NaNs which could be a result of a computation (e.g. 0.0/0.0) which you must differentiate from your tagged values, if you set the FPU "flush to zero" mode, they will not be generated as a result of a computation; see e.g. [https://stackoverflow.com/questions/54531425/is-it-possible-in-floating-point-to-return-0-0-subtracting-two-different-values/54532647#54532647](https://stackoverflow.com/questions/54531425/is-it-possible-in-floating-point-to-return-0-0-subtracting-two-different-values/54532647#54532647)
