It sounds like there is some general misconceptions from your question. When shooting RAW, the amount of light that hits each sensor is stored. Each individual point on the sensor only measures the amount of photons that have hit it (effectively luminosity). Filters above the sensor result in color information that the "pixel" is capturing.
Image processing is applied to the raw data to determine full color pixels instead of a mesh of red, green and blue pixels. The color space is also reduced to what can be displayed on most screens (which are generally limited to 8 bit color or less).
There is no particular advantage to a sensor shooting in raw that isn't also present when shooting JPEG since the only difference between the modes is that in JPEG shooting, the RAW data is processed in camera, while when shooting RAW, the raw data is stored for later processing.
There are many ways that one sensor can be better than another. The technology of the sensor can differ, CMOS vs CCD are two different technologies for image sensors. CMOS tend to be cheaper and higher resolution, but they sample by scanning. CCDs on the other hand sample frame at a time, but are more expensive and generally lower resolution, but sampling the entire frame at the same time makes them better for video for example.
Additionally, there is the actual resolution of the sensor which should be self explanatory. There is the level of noise in the sensor. The less noise a sensor experiences, the cleaner the signal will be. There is also higher levels of sensitivity which can allow for use in lower light environments and for finer detail to be resolved.
The pattern of the red, green and blue filters also has an impact on the color accuracy and gamut that the camera can support as well as to the level of accuracy in the color. Some sensors layer sensors with different filters which reduces the amount of light that they can work with, but also produces slightly higher resolution from resolving each color from a single point instead of multiple nearby points.
The size of the sensor itself and the "pixels" on it impacts things like diffraction limiting which limit the maximum resolution of the camera due to physical properties of light itself. It also impacts the depth of field and apparent focal length for any given lens. (An APS-C sensor takes up less room, so it crops the image circle thrown by a lens compared to what the lens would throw for a full frame sensor.)
I'm sure there are other ways that sensors can differ in quality that I'm not thinking of, but it should give you an idea of what some of the differences are. Hopefully it also helped clear up the confusion about what RAW photography actually is.