Can I get one array to manage both an object and its script simultaneously?

At the moment I'm using two arrays; one for the cubes I'm managing and one for a script inside of them. Is it possible to get this down to one array only?

private var cubes : GameObject[];
private var cubeScripts : boxmover[]; // The script in question

private var i : int;
private var j : int;
function Awake () {
    cubes = GameObject.FindGameObjectsWithTag ("cube"); 
    for (i = 0 ; i<cubes.length; i++)
        {
            cubeScripts _= cubes*.GetComponent(boxmover);*_
 _*}*_
_*}*_
_*function Update()*_
_*{*_
 _*for (i = 0 ; i<cubes.length; i++)*_
 _*{*_
 <em>_cubeScripts*.DoUpdate();*_</em>
 <em>_*}*_</em>
<em>_*}*_</em>
<em>_*```*_</em>

I would make the "cubes" array local to the Awake function, and use cubeScripts.length in Update. You only need the cubes array for FindGameObjectsWithTag; no point keeping it around otherwise.

Alternately, if the "boxmover" scripts are only attached to those tagged objects anyway, you can use FindObjectsOfType, which would indeed use just one array.

Class CubeWrapper
{
    var cubeGO : GameObject;
    var script : CubeScript;
    function CubeWrapper(in : GameObject)
    {
        cubeGO = in;
        script = in.GetComponent(CubeScript);
    }

}

create an array of those and access the public variables.