I'm using this formula but It's actually picking in a square area.
(cos(random(360)) * radius) + posx
(sin(random(360)) * radius) + posy
posx and posy is the center, which is player's position.
radius is the attacking range of the enemy.
The goal is to pick random destinations but within attacking range of the enemy, so he can walk around while his attack is in cooldown.