[SOLVED]How do I spawn GameObject[] in Transform[]?

I have 2 arrays: GameObject[] enemy; Transform[] spawns;

How do I randomly spawn enemies at random spawn point?

Edit: I was looking for this:
GameObject temp = (GameObject)Instantiate(enemy[(Random.Range(0, 2))], spawns[(Random.Range(0, 4))].transform.position, Quaternion.identity);

Instantiate creates a copy of a prefab or an existing gameobject. The UnityEngine.Random static class is a simple way to get random numbers.

I’m a beginner too but I think if you use a navmesh and prebake everything then you just need to create a loop and set a random location(with Random.Range()) to the agent and then ask if It’s a valid path by using NavMeshAgent.HasPath. Then If true store this coordinate in your Transform spawns;