A pipeline for ligand discovery using small-molecule microarrays