Globular clusters in the Magellanic Clouds - II. IR-array photometry for 12 globular clusters and contributions to the integrated cluster light