All responses imply that the array keeps a list of objects which need to be freed, which might be inferred from the phrase "I want them to be nil". However the question is not really clear on that.
If the array keeps simple values instead, the obvious solution would be
SetLength (aArray,0);
SetLength (aArray,x);