Instantiating an array of objects - how can I instantiate a certain prefab only once?

I’m using the following code to randomly instantiate an array of hazards. The array currently consists of 6 hazards. I want to add in one power-up but I only want this to appear in the array once during a round.

Can anyone help?

IEnumerator spawnWaves()
    {
        inRound = true;

        while (true) {

            for (int i = 0; i < hazardCount; i++)
            {
                if (roundEnd == true)
                {
                    inRound = false;
                    yield return new WaitForSeconds(2);
                    StartCoroutine("rest1");
                    yield break;
                }

                GameObject hazard = hazards[Random.Range(0,hazards.Length)];
                Vector3 spawnPosition = new Vector3(Random.Range(-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z);
                Quaternion spawnRotation = Quaternion.identity;
                Instantiate(hazard, spawnPosition, spawnRotation);
                yield return new WaitForSeconds(Random.Range(spawnWaitMin, spawnWaitMax));
            }

            yield return new WaitForSeconds(Random.Range(waveWaitMin, waveWaitMax));

        }

    }

If hazardCount > hazards.Lenght, you will have duplication, unless you keep the following line :

      if( hazardCount > hazards.Length )
               hazardCount = hazards.Length ;

This is the script I fixed for you :

IEnumerator spawnWaves()
{
    List<int> indices = new List<int>();
      if( hazardCount > hazards.Length )
               hazardCount = hazards.Length ;

    inRound = true;
    while ( true )
    {
        indices.Clear();

        // Populate list of indices
        for ( int i = 0 ; i < hazardCount ; i++ )
            indices.Add( i );
        
        for ( int i = 0 ; i < hazardCount ; i++ )
        {
            if ( roundEnd == true )
            {
                inRound = false;
                yield return new WaitForSeconds( 2 );
                StartCoroutine( "rest1" );
                yield break;
            }

            // Select hazard to instantiate
            int index                = indices[Random.Range(0,indices.Count)];
            GameObject hazard        = hazards[index];
            Vector3 spawnPosition    = new Vector3(Random.Range(-spawnValues.x, spawnValues.x), spawnValues.y, spawnValues.z);
            Quaternion spawnRotation = Quaternion.identity;
            GameObject go            = Instantiate( hazard, spawnPosition, spawnRotation ) as GameObject;
            indices.Remove( index );

            yield return new WaitForSeconds( Random.Range( spawnWaitMin, spawnWaitMax ) );
        }

        yield return new WaitForSeconds( Random.Range( waveWaitMin, waveWaitMax ) );

    }

}