map.array function invented