It’s actually quite simple: Lua strings are interpreted on a per-byte level, meaning you can use the full range of 0->255, and a Lua string will store that data literally and allow you to read it back as individual bytes.
I think where the confusion comes from is that GUI elements such as TextLabels interpret those bytes as UTF-8 characters, which have a larger range and may in some cases span multiple bytes.
Edit: You also mentioned DataStores, which also require UTF-8 compliant bytes and may change some bytes to fit the standard. If you’re trying to store raw binary data in DataStores, I’d suggest Base64-encoding them before storing them.