Array of buttons

Can anyone lead me in the right direction or have a better suggestion for what I should do. I’m trying to create an array of buttons 1 by 12 array. Then each button should be assigned a different onkeydown + be able to be clicked to activate a function. something like this but not sure how it would work exactly with correct coding. I just have a basic idea.

var buttonwidth = 35;

var buttonheight = 35;


//array of buttons 1 x 12 displays on gui

//button = newButton1  (keybind("1"), activateOne();)

//button = newButton2 (keybind("2"), activatetwo();)



function activateOne ()  {


//once button is pressed or key is pressed activate this code


}


function activatetwo ()  {


//once button is pressed or key is pressed activate this code


}

Actually, ignore my previous comment. Check this out.
Its a selection grid full of buttons.