From the docs for $addToSet:
If the value is an array,
$addToSetappends the whole array as a
single element. To add each element of the value separately, use
$addToSetwith the$eachmodifier. See Modifiers for details.
So you should use this instead:
db.c.update({}, {$addToSet: {a: {$each: [2, 4]}}})