How can i get access to a script from other scripts on other GameObjects ?

I have a script that is kind of global should be in the idea.
I’m creating some GameObjects over the Terrain.

The problem is that making GetComponent will work only if two scripts are on the same GameObject. So the script that create the GameObjects is on a GameObject but i have more scripts on other GameObjects and i wonder how can i get access to the script from other scripts ? Without using GetComponent.

This is the script that create the GameObjects:

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class InstantiateObjects : MonoBehaviour
    public GameObject prefab;
    public Terrain terrain;
    public float yOffset = 0.5f;
    public int objectsToInstantiate;
    public bool parent = true;

    private float terrainWidth;
    private float terrainLength;
    private float xTerrainPos;
    private float zTerrainPos;
    private List<GameObject> prefabs = new List<GameObject>();

    public void Start()
        //Get terrain size
        terrainWidth = terrain.terrainData.size.x;
        terrainLength = terrain.terrainData.size.z;

        //Get terrain position
        xTerrainPos = terrain.transform.position.x;
        zTerrainPos = terrain.transform.position.z;


    public void generateObjectOnTerrain()
        for (int i = 0; i < objectsToInstantiate; i++)
            //Generate random x,z,y position on the terrain
            float randX = UnityEngine.Random.Range(xTerrainPos, xTerrainPos + terrainWidth);
            float randZ = UnityEngine.Random.Range(zTerrainPos, zTerrainPos + terrainLength);
            float yVal = Terrain.activeTerrain.SampleHeight(new Vector3(randX, 0, randZ));

            //Apply Offset if needed
            yVal = yVal + yOffset;

            //Generate the Prefab on the generated position        
            GameObject objInstance = Instantiate(prefab, new Vector3(randX, yVal, randZ), Quaternion.identity);
            if (parent)
                objInstance.transform.parent = this.transform;

    public List<GameObject> PrefabsList()
        return prefabs;

Now if i want to do on another script:

InstantiateObjects gos = GetComponent<InstantiateObjects>();

I need that both scripts to be on the same GameObject.
But if i have a third script on another GameObject and i want also to get access to InstantiateObjects ?

InstantiateObjects otherscript;
GameObject objInstance = Instantiate(prefab, new Vector3(randX, yVal, randZ), Quaternion.identity);
otherscript.somevariable= “whatever”;