Method for converting strings to byte arrays (inverse of to_s)
There is already a `to_s(encoding)` method to decode a byte array to a string. It would be useful to have a method for the opposite direction as well (encoding a string to a byte array).

My use case for this is writing literal byte arrays that only contain text. For example, if I have a byte array field that can contain any data (not necessarily valid ASCII) and want to check if it's equal to the ASCII string `"abc"`, I have to write `field == [0x61, 0x62, 0x63]`. It would be much more convenient and readable if I could write something like `field == "abc".to_bytes("ASCII")` instead. (I can't safely use `field.to_s("ASCII") == "abc"` - that would fail if `field` contains non-ASCII bytes.)