Adding generic loading of arrays

Signed-off-by: Ilya Nelkenbaum <ilyan@mellanox.com>