Release the Gremlins does not say "up to X target artifacts", it says "X target artifacts". If your opponent has two artifacts and you pay 7 mana (X=3), you MUST target one of your own if you have one. It's still valid even if there aren't enough valid targets, but you can't choose to spare your own artifacts if you run out of valid targets on the opponent's board.

Compare Reckless Spite. You can cast it when there's only one valid target and it'll destroy that target, but if there's exactly two valid target then you've got to destroy both of them no matter where they are.