Solution 1:

There is no way to target all boss mobs at once. You can however fake this behaviour by giving every boss mob a scoreboard tag like this:

scoreboard players tag add @e[type=YOURMOB] boss

The above command should be placed in a repeating command block and should be copied for every boss mob.

you can target all players close to boss mobs like this:

# this command puts all player names in chat of those who are within 20 blocks of a boss.
execute @e[tag=boss] ~ ~ ~ execute @a[r=20] ~ ~ ~ say @s

You can ofcourse replace say @s with any command