Creating an array in sql is not so difficult job but it takes a while to do it correctly in first go. Here is a sample piece of code which will help you understand creation and population of an sql array. Below piece of code also demonstrates copying values from one array to another array.
output_array VARCHAR2_TT:= VARCHAR2_TT();
--Assuming input_array gets populated
FOR i IN input_array.FIRST .. input_array.LAST LOOP
Hope you find this information useful. Please leave your footprints in comments section below for any queries or suggestions.