How to dynamically test multiple parameters of a component in a loop?

I need to cluster a bunch of molecules but first I need to find the optimal combination of parameters for the component (e.g. fingerprint type, similarity score, number of clusters ecc..). 

From a programming POV one should loop over an array of values that will be passed one by one to the component at each iteration. Then each result should be stored and subsequently analyzed to look for the combination of parameters giving the best result possible. How do I do something like this in pipeline pilot??

Also multiple metrics are widely used to check the reliability of the results (e.g. silhouette score), however this is not included in any components, hence I should calculate that on my own, but how do I do it if the node doesn't even outputs any similarity matrix or distances among each molecules? 

Please if anybody has any idea, help me!

Thanks in advance,

Andrea Saltalamacchia