Handling of arrays and dictionaries as input parameters, arrays as a result

Change-Id: I0522086580590fe7c8437ead9fe538abc7b9ee62