8 Bit Numbers

Can I write this command if I make an 8 bit number entry with buttons?
byte p[2,3,4,5,6,7,8,9]

Can I write this command

You can write it but it will not declare an array

I suspect that you meant

const byte p[] = {2,3,4,5,6,7,8,9};

I suspect that you do not understand arrays or what an 8 bit number is.