A creature's stat block will indicate what kind of multiattack it gets to make.
For instance, if we look at a Black Bear (MM, p. 318), it says:
Multiattack. The bear makes two attacks: one with its bite and one with its claws.
If a bear were somehow to pick up a sword or two it wouldn't be able to use them for multiattack.
However, if we look at a Doppelganger, it says:
Multiattack. The doppelganger makes two melee attacks.
Sword attacks are melee attacks.
Thus, as per RAW, there should be nothing stopping a Doppelganger (or any other monster with such wording) from using its sword(s) and/or Slam attack for multiattack.