How to check if mouse over object without adding so many scripts?

I need to check if my mouse is over an object. The problem is that there are a ton of those same objects. Like A LOT of those objects. Do I have to add a script to every object that contains void OnMouseDown() or can I do something inside my main player script? I really need help with this and I cannot find an answer online because it hasnt been asked probably. If I do have to add a script to all those objects, will it slow down my game at all? Thanks and all tips are appreciated.

(If you want more information on what I am doing, I am trying to make a cover system in my game. Whenever my mouse is over an object, my player will move to cover in that specific cover area.) Thanks guys!!

Use RayCast instead, it will require only one script.

For example:

var ray = Camera.main.ScreenPointToRay (Input.mousePosition);
    var hit : RaycastHit;
    if (Physics.Raycast (ray, hit, 1000)) {
         Debug.Log("You hit: "+hit.collider.gameObject);
    }

change if statement: if (Physics.Raycast (ray, out hit, 1000f))