Yes you can program arduino board using a MATLAB script. You have to use a MATLAB Function Block to do that. The support started since R2019b. In R2019b three peripherals are supported - Analog input, Digitla IO and PWM. In R2020a, I2C and SPI is also in plan for support. Look into the documentation below.
Best Answer