Using an array with buttons on th stage

I’m familiar with using arrays with for loops, where the buttons are created dynamically. However I’m building an application with calendar month grids, where maybe half the dates are clickable. How would I use an array to address these buttons so I don’t have to write code for each individual button? Or is there a better way than using an array to keep my code as simple as possible?