Prefill_ looksups and scripts

Two questions, rolled into one.

I started using prefill_ to populate a form with URL parameters which worked a treat against a single line text field. However, I’ve had no joy in getting the prefill_ to work against a lookup field. Is this possible?

I then explored using a script to copy the value from a single line text field into a lookup field, so that I can create a linked value. However, when I tried this, I kept on getting error messages about the lookup field being an array and I couldn’t work out how to pass the single field values into an array, to populate the lookup field!

Any help would be much appreciated.

Simon