8 minor update
source | link
a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>sx=>x!=x&=s&!x.indexOf(y))?y+c:y))
a =>                          // given an array of strings 'a'
  a.map(s =>                  // for each string 's' in 'a':
    [...s].reduce((y, c) =>   //   starting with 'y' = first character of 's',
                              //   for each subsequent character 'c' of 's':
      a.some(x =>             //     if we find a string 'x' in 'a' such that:
        sx != xs &              //       - 'x' is different from 's'
        !x.indexOf(y)         //       - and 'y' appears at the beginning of 'x'
      ) ?                     //     then:
        y + c                 //       append the next character'c' to 'y'
      :                       //     else:
        y                     //       keep 'y' unchanged
    )                         //   end of reduce(): returns the correct prefix
  )                           // end of map()
let f =

a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>sx=>x!=x&=s&!x.indexOf(y))?y+c:y))

console.log(JSON.stringify(f(["Monday","Tuesday","Wednesday","Thursday","Friday"])))
console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))
a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>s!=x&!x.indexOf(y))?y+c:y))
a =>                          // given an array of strings 'a'
  a.map(s =>                  // for each string 's':
    [...s].reduce((y, c) =>   //   starting with 'y' = first character of 's',
                              //   for each subsequent character 'c' of 's':
      a.some(x =>             //     if we find a string 'x' such that:
        s != x &              //       - 'x' is different from 's'
        !x.indexOf(y)         //       - and 'y' appears at the beginning of 'x'
      ) ?                     //     then:
        y + c                 //       append the next character to 'y'
      :                       //     else:
        y                     //       keep 'y' unchanged
    )                         //   end of reduce()
  )                           // end of map()
let f =

a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>s!=x&!x.indexOf(y))?y+c:y))

console.log(JSON.stringify(f(["Monday","Tuesday","Wednesday","Thursday","Friday"])))
console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))
a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>x!=s&!x.indexOf(y))?y+c:y))
a =>                          // given an array of strings 'a'
  a.map(s =>                  // for each string 's' in 'a':
    [...s].reduce((y, c) =>   //   starting with 'y' = first character of 's',
                              //   for each subsequent character 'c' of 's':
      a.some(x =>             //     if we find a string 'x' in 'a' such that:
        x != s &              //       - 'x' is different from 's'
        !x.indexOf(y)         //       - and 'y' appears at the beginning of 'x'
      ) ?                     //     then:
        y + c                 //       append 'c' to 'y'
      :                       //     else:
        y                     //       keep 'y' unchanged
    )                         //   end of reduce(): returns the correct prefix
  )                           // end of map()
let f =

a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>x!=s&!x.indexOf(y))?y+c:y))

console.log(JSON.stringify(f(["Monday","Tuesday","Wednesday","Thursday","Friday"])))
console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))
7 added the commented version
source | link

Formatted and commented

a =>                          // given an array of strings 'a'
  a.map(s =>                  // for each string 's':
    [...s].reduce((y, c) =>   //   starting with 'y' = first character of 's',
                              //   for each subsequent character 'c' of 's':
      a.some(x =>             //     if we find a string 'x' such that:
        s != x &              //       - 'x' is different from 's'
        !x.indexOf(y)         //       - and 'y' appears at the beginning of 'x'
      ) ?                     //     then:
        y + c                 //       append the next character to 'y'
      :                       //     else:
        y                     //       keep 'y' unchanged
    )                         //   end of reduce()
  )                           // end of map()

Test cases

let f =

a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>s!=x&!x.indexOf(y))?y+c:y)) 

console.log(JSON.stringify(f(["Monday","Tuesday","Wednesday","Thursday","Friday"])))
console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))

Test cases

let f =

a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>s!=x&!x.indexOf(y))?y+c:y))

console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))

Formatted and commented

a =>                          // given an array of strings 'a'
  a.map(s =>                  // for each string 's':
    [...s].reduce((y, c) =>   //   starting with 'y' = first character of 's',
                              //   for each subsequent character 'c' of 's':
      a.some(x =>             //     if we find a string 'x' such that:
        s != x &              //       - 'x' is different from 's'
        !x.indexOf(y)         //       - and 'y' appears at the beginning of 'x'
      ) ?                     //     then:
        y + c                 //       append the next character to 'y'
      :                       //     else:
        y                     //       keep 'y' unchanged
    )                         //   end of reduce()
  )                           // end of map()

Test cases

let f =

a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>s!=x&!x.indexOf(y))?y+c:y)) 

console.log(JSON.stringify(f(["Monday","Tuesday","Wednesday","Thursday","Friday"])))
console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))
6 saved 4 bytes
source | link

JavaScript (ES6), 81 78 7474 70 bytes

Takes input as an array of strings.

a=>a.map(s=>[...s].reduce((y,c,i)=>a.some(x=>s!=x&x=x&!x.sliceindexOf(0,iy)==y)?y+c:y))

Test cases

let f =

a=>a.map(s=>[...s].reduce((y,c,i)=>a.some(x=>s!=x&x=x&!x.sliceindexOf(0,iy)==y)?y+c:y))

console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))

JavaScript (ES6), 81 78 74 bytes

Takes input as an array of strings.

a=>a.map(s=>[...s].reduce((y,c,i)=>a.some(x=>s!=x&x.slice(0,i)==y)?y+c:y))

Test cases

let f =

a=>a.map(s=>[...s].reduce((y,c,i)=>a.some(x=>s!=x&x.slice(0,i)==y)?y+c:y))

console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))

JavaScript (ES6), 81 78 74 70 bytes

Takes input as an array of strings.

a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>s!=x&!x.indexOf(y))?y+c:y))

Test cases

let f =

a=>a.map(s=>[...s].reduce((y,c)=>a.some(x=>s!=x&!x.indexOf(y))?y+c:y))

console.log(JSON.stringify(f(["one","two","three","four","five","six","seven"])))
console.log(JSON.stringify(f(["red","orange","yellow","green","blue","purple"])))

5 saved 4 bytes
source | link
4 Rollback to Revision 2
source | link
3 saved 5 bytes
source | link
2 saved 3 bytes
source | link
1
source | link