Direct measurement of individual optical forces in ensembles of trapped particles