The CFA sensor works like that, the Foveon sensor gets the full spectrum from C1 to C4.

With three numbers?

For the Foveon sensor it is like I wrote above all photons hitting the sensor are penetrating the silicon in different depths according to their wavelength and are captured with the responding value by the three sensing devices in the silicon according to their penetration depth.

The problem is, photons can have infinitely many frequencies; to be more precise, they span an infinitely dimensional space. You cannot capture all possible frequencies/wavelengths with three sensing devices. And you do not want to. You want to capture what the human eye does: a projection to a certain 3D space but the Foveon sensor is very poor at that.