EAGLESIX-2716: wrote setToArray in Helpers.js