PHP/CFML: mapping and reducing