Microcavity arrays represent millions of different reaction compartments to screen for e.g. molecular interactions, exogenous factors for cells or enzymatic activity. We present a novel method to selectively synthesize different compounds in arrays of microcavities with up to 1,000,000 cavities per cm2. In our approach, polymer microparticles with embedded pre-activated monomers are selectively transferred into microcavities with laser radiation. After particle patterning, heating of the particle matrix simultaneously leads to diffusion and coupling of the monomers inside each microcavity separately. This method exhibits flexibility, not only in the choice of compounds, but also in the choice of particle matrix material, which determines the chemical reaction environment. The laser-assisted selective functionalization of microcavities can be easily combined with the intensively growing number of laser applications for patterning of molecules and cells, which is useful for the development of novel biological assays.