Don’t you have different types of balls or do you just want to change the sprite? If you just have different sprites, your solution is fine. If you have different types of balls, create an empty Ball game object in your Hierarchy, set the position to (0, 0, 0). Assign your SetBall script to that game object.
Then assign your different balls as child game objects.
Ball (Parent)
> Ball 1
> Ball 2
> Ball 3
> ...
The ball types have everything they need to be a complete, independent ball.
In your SetBall class, you create an array of GameObjects. Assign the child game objects to the SetBall component attached to the parent game object.
For example like this:
[SerializeField] private GameObject[] balls;
private GameObject activeBall;
void Awake()
{
activeBall = balls[0];
}
public void ChangeBall (int index)
{
GameObject nextBall = balls[index];
activeBall.SetActive(false);
nextBall.transform.position = activeBall.transform.position;
activeBall = nextBall;
activeBall.SetActive(true);
}
If you want to instantiate balls, you could assign prefabs to the array. In that case, you’ll need a variable of the instantiated ball, so you can destroy it.
GameObject ball;
void DoSomething()
{
ball.SetActive(false);
Destroy(ball);
GameObject newBall;
newBall = Instantiate(ballPrefab, ball.transform.position);
ball = newBall;
}
Hopefully, this helps. Please feel free to ask our helpful community of students for advice in our official Discord chat. 
See also: