Create byte array of the correct size for the needed message.