[mw/yarp] Fix typo in generic encoding, and provide encoding for tuple