this function is needed due to R dropping the names when it subsets
subsetFunc(array.in, gname, path)
array.in
gname
path
named vector or array