Generate keyboard shortcuts for a menu
Javascript (ES6) 106 105 100
This function takes input as an an array and outputs a javascript object.
f=i=&gt;i.map(a=&gt;{for(b of c=a.toLowerCase(d=0)+d+123456789)d&lt;!o[e=b&gt;=0?c[0]+b:b]&amp;&amp;(o[d=e]=a)},o={})&amp;&amp;o

Results:
f(['File', 'Edit', 'View', 'Help']);
// {&quot;f&quot;:&quot;File&quot;,&quot;e&quot;:&quot;Edit&quot;,&quot;v&quot;:&quot;View&quot;,&quot;h&quot;:&quot;Help&quot;}

f(['Foo', 'Bar', 'FooBar', 'FooBars']);
// {&quot;f&quot;:&quot;Foo&quot;,&quot;b&quot;:&quot;Bar&quot;,&quot;o&quot;:&quot;FooBar&quot;,&quot;a&quot;:&quot;FooBars&quot;}

f(['a', 'b', 'aa', 'bb', 'bbq', 'bbb', 'ba']);
// {&quot;a&quot;:&quot;a&quot;,&quot;b&quot;:&quot;b&quot;,&quot;a0&quot;:&quot;aa&quot;,&quot;b0&quot;:&quot;bb&quot;,&quot;q&quot;:&quot;bbq&quot;,&quot;b1&quot;:&quot;bbb&quot;,&quot;b2&quot;:&quot;ba&quot;}

Ungolfed / Commented:
f=i=&gt;{
  o={};                                        // initialize an object for output
  i.map(a=&gt;                                    // loop through all values in input
    for(b of c=a.toLowerCase(d=0)+d+123456789) // loop through all characters of the string with 0123456789 appended to the end
                                               // and initialize d as 0 to be used as a flag 
      e=b&gt;=0?c[0]+b:b                          // if b is a number, set e to the first character + the number, otherwise b
      if(d&lt;!o[e])                              // if the flag hasn't been triggered and o doesn't have a property e
        o[d=e]=a                               // then store the value at e and trigger the d flag
  )
  return o                                     // return the output object
}