Looking at your question, I guess, you are looking for either finding ASCII code from character or Key Codes/ Char Codes from keys. Not sure about why you have used the word "array" though.
To find ASCII code from character-
var a = 'a';
alert(a.charCodeAt());
List of ASCII Codes[
^]
Following links may help finding key codes/char codes
How to find the key code for a specific key[
^]
KeyboardEvent.keyCode[
^]
Hope, it helps :)
In case you are looking for something else, please let me know with little better description about your problem.