Looking at some of the ‘Detect’ spells (Detect Magic, Detect Poison and Disease, Detect Evil and Good) descriptions, they specifically state within 30 feet you sense magic/poison/disease/good/evil. The player would not be targeting or choosing something, implying they are an AoE type of spell. I purposely did not include ‘Detect Thoughts’ as it has its own set of very specific rules and targeting, but the principle of the other detection spells appear to apply making it a logical conclusion that they are an AoE type of spell by reviewing the descriptions on pgs 231-233 of the PHB.
In any event, the Dispel Magic spell DOES specifically say, you must choose something. To me, that implies it must be targeted.
However (BIG however), it seems to me, the name of the spell ‘Dispel Magic’ really doesn’t seem to match its effects based on its actual description, which could be the cause of confusion and this question being posed . . . which is what the thread is really about.
If the name of the spell reflects the outcome of the spell, it could mean that by casting a Dispel Magic spell upon a +15 magical sword, you could remove the +15 making it a normal sword regardless of what the +15 could do (acid, fire, frost, melee, etc). I realize I’m overpowering this sword, but it’s just an example. Of course, this would not include sentient magic items. If it were sentient, the magic could not be dispelled without ability DC checks based on Intelligence, Wisdom, and Charisma as outlined in the DMG pg 214.
I personally do not believe that it was intent of the game designers with this particular spell to really dispel magic per sè. In my very limited opinion, the spirit of what I think the designers were trying to accomplish, it should be called “Remove Spell”, not “Dispel Magic”. If it was truly a “Dispel Magic” spell it could remove the qualities of ANY non-sentient magical item, thus skewing the D&D universe. But, if it were a “Remove Spell” spell, it could then remove any spell effect cast upon the object or creature.
That being said, it still comes down to being able to target or focus the magical energy of the spell upon something (person, object, creature).
Seeing how the current definition of Dispel Magic does not specifically refer to an AoE, such as a cone, cube, cylinder, sphere, within 30 feet, etc., but DOES refer to choosing something, I take it that something must be targeted. If you can’t target something, there really is no way the spell could hit and have some type of effect. To me, it would be a VERY high DC to have the chance to hit the wizard to remove the invisibility spell.
So maybe a ‘Detect Magic’ spell could be used first to find the wizard. It has a 30 foot AoE and if he’s within that range, you could now detect him for targeting and tell your party where he is so another magic user could ‘aim’ their Dispel Magic spell thus making him visible, or a melee player could try to attack (with disadvantage as it’s just your words and the wizard is still invisible).
Bottom line and ultimately, it truly comes down to the DM. Based on RAW, from what I can ascertain, your question is a quandary of the D&D universe leaving it up to the DM of the adventure.