Encode a memory operand.