Fix generic array creation

Signed-off-by: Alin Dreghiciu <adreghiciu@gmail.com>