scripts for constraints and bone locations (head/tail)?

Hello

I tried to find a script which takes at first a target list (order by selection) and second a Constraints object/bone list (order by selection) and add a contraints (the same) by index order for the two lists.

Also a script which place bones between emptys also by selection order.

Would be awesome to have such a kind of script maybe someone knows something.