wanna quickly hexlify your payload and msfvenom doesn’t offer that option?

cat <payload_file> | xxd -p | tr -d '\n' | sed 's/../\\x&/g'

as thankfully explained by two saviours from stackoverflow: xxd portion and sed portion

and the other way: converting a file containing hex characters into a .bin:

xxd -r -p input.txt output.bin

saviour