Change implementation of primitive numeric types to use typed arrays.