refactor uniform abstraction to handle arrays, and all behind one set() method