This isn't valid - you're trying to define an array with no elements (different than an array with zero elements).
 Code:
; Get CD Key
$P = -1
ReDim Preserve $aData[$P]    ; increase the array size, preserving prior data
$aData[$P] = $Product + ',' + $Key
The way this type of thing works is like this:
 Code:
Dim $aData  ; declare a plain variable
Dim $P   ; declare the pointer
$P = -1  ; pointer is "empty", since the first position is "0"

; Enumerate some data
For Each $Thing in $Collection
  If InStr($Thing, 'Need')  ; does this thing contain what we're looking for?
    ; Add the object to an array of matches
    $P = $P + 1  ; increment the pointer to the next array position
    ReDim Preserve $aData[$P] ; increase the array, preserving prior contents
    $aData[$P] = $Thing
  EndIf
Next
You'll need to use this model in your code. Note that the increment of $P and ReDim of the array only occur when a match is found. This is where you need to put the array redim and assignment:
 Code:
        If $Product
          $Key = Get_Product_Key(ReadValue(Join(Split($value,'<=>DigitalProductId'),''), 'DigitalProductID'))
		  $P = $P + 1  ; increase array pointer
        EndIf


Glenn
_________________________
Actually I am a Rocket Scientist! \:D