convert flat array to object with day names