Idk if this is a stupid idea, but you could just store all the values in a string and separate them with a character, say "|", then use stringsplit? (this way it would automatically size the array, and only have to enum once)
Local $regamount = 1
Local $keys = ''
do
$key = RegEnumKey("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall", $regamount)
$keys &= $key&'|'
$regamount += 1
until @error
$array = stringsplit($keys, '|')
Edit: working example