Heat transport in harmonic oscillator systems with thermal baths: application to optomechanical arrays