Well, weather balloons contain a very small package that continuously measures temperature, dew point, air pressure and maybe a few other environmental parameters, and transmits that to a ground station.
These packages are small, light and essentially expendable (because there's no guarantee that it will be found and sent back to the weather institute).
So the technology to measure temperature & dew point and thus relative humidity easily is available. Why it isn't used in aircraft... I have no idea.