for (const key of yourArray) {
      obj[key] = whatever;
 }