Use for loops and still assign gameObjects in editor

Hi everyone. Sorry if my title is confusing. I was wondering if there was a way to use for loops to make multiple gameObject fields, but still be able to assign gameObjects. The problem is that the user can resize the array, so I have to call `new GameObject[number]` every frame, so the objects cannot be set. All help is appreciated!!! :)

Instead of using a built-in array, I'd suggest a List. This will allow you to resize at will thus avoiding the issue of clearing the array out every time you'd like to change array size.

import System.Collections.Generic;
var obj : List.<GameObject> = new List.<GameObject>();

// Creates a drag and drop column for gameobjects.
for(i = 0; i < obj.Count; i++)
{
    obj _= EditorGUILayout.ObjectField(obj*, GameObject);*_
_*}*_
_*```*_