There are two valid solutions for an arc, given two points and a radius. Consider that if the two points form an imaginary line, the arc could be on either side on that line, if unconstrained otherwise.
The equation is invalid if the distance between the points is greater than radius * 2, because the arc cannot reach both the points if this is the case. It is also invalid if the points are exactly coincidental, because this would imply that the center would be infinitely far away.
For any other case, the center of the arc can be thought to offset from the middle of the two points, perpendicular (or 90 degrees) to the line formed by the points. I don't have the exact formula for the distance, but it can be solved with some arc trigonometry.
When you have determined the center offset, you have to pick the side of the line to which to offset the center of the arc. Commonly this is done by defining the order of the two points (start and end) and rotating the formed line 90 degrees about the start point to arrive to a baseline direction. Then you'd take the dot product of said baseline direction and the offset vector to determine which side you're on, and constrain the direction based on that.
You can find the angles by observing the tangent of the circle, part of which the arc is. The tangent of a given point on a circle is the vector from the center of the circle to the point, rotated 90 degrees (or pi/2 radians) and starting from said point. The actual angle on the xy plane (about z) is given by atan2(x,y), with x and y being the tangent vector's components.