I want to build a new gantry and add new motors to make my

I want to build a new gantry and add new motors to make my bed size bigger on my K40. Can I use a smoothie board for any size gantry?

Yes

Just change it in your config file

Where is the config file located?

On your SD card when the board is plugged into your computer you can access it in the file manager