You can convert a String to RawArray using the toascii or toutf8 methods of String, and you can convert RawArray to String using the getstringfromascii and getstringfromutf8 methods of RawArray.
There is no built-in way to convert between int and RawArray. You could calculate the bytes manually but it would be exceptionally inefficient because you will be doing heavy arithmetic in GDScript.