Hi @massinissa,
yes you can use this method for searching an account or other(search, getObject, read from plan…).
A multivalued attribute is list of object, so you need create a list/array of the same type and put into attribute with setAttribute().
little question: Are you sure to change an account attribute in the after? with this, you have a value in SP for this attribute and another value in the target system