Nintendo DS and DS lite you can with a flash cart.
DSi and DSi XL you can as well but some older cards may not work due to Nintendo blocking them with firmware updates. These don't get updated anymore I don't think so you should be fine with pretty much anything.
3DS/3DS XL/2DS these firmwares are still actively being updated and usually they come up with new blocks. You are going to need the latest R4 or Supercard DS two. These will play DS backups but not 3DS ones. Supercard is more expensive but has more features and is basically future proof, if it gets blocked there is a patch pretty much by the next day to get around it. The R4 is more of a generic name and has many people who use it and many times a block has required you to get a new card. If you plan on keeping your 3DS up to date on firmware it is probably best to get the Supercard DStwo. If you get an R4 make sure it runs unmodified "wood" firmware or else you are at high risk of getting a card that will die and not be updated.