Assign an array to an ESB Payload ?

Hi,

Currently tinkering with ESB comms, everything is fine but I was wondering whether there is a simple way to assign an array to a payload.
For now, I have 2 int variables, say 301 and 257 and I assign each digits to the payload:
tx_payload.data[0] = 3;
tx_payload.data[1] = 0;
tx_payload.data[2] = 1;
tx_payload.data[3] = 2;
tx_payload.data[4] = 5;
tx_payload.data[5] = 7;

and do the same on the RX side, decomposing them into numbers.

In order to assign those two int variables into the payload, I tried to achieve this into a char string (of 6) like "301257" and then assign this to tx_payload.data without success.

Is there any way to assign 2 int variables directly into the payload and the other way around, something like value1 = rx_payload.data[0..2] and value2 = rx_payload.data[3..5] ?

Any help or hint GREATLY appreciated

Steve