Unless you have pre-initialised your $head Array to a set size then you would use code like the following within your StoryInit special passage to add those head items to an empty Array.
<<set $head to >>
name: "Pirate hat",
There are a couple of issues with your original example:
1. You are not suppressing or escaping the invalid line-breaks within the HTML table structure.
By default each line-break within the contents of a Passage is automatically converted to a HTML br element, and this element is invalid within a table structure if they appear anywhere other than inside the th or td elements.
2. You are using an undefined $wHead story variable as the index reference of your $head Array.
You would generally use the _i temporary variable you defined in your <<for>> macro for that.
3. You are trying to use Dot Notation to dynamically access the elements of your $head Array.
You can't do that, and will need to use square bracket notation instead as demostrated by the following example.
\<<for _i to 0; _i lt $head.length; _i++>>
4. You aren't using a <<break>> macro to stop the <<for>> macro ones the equipped item is found.
The following is a slightly modified version of your original code, it resolves the above mentioned issues as well as uses the range version of the <<for>> macro to make things a little easier.
<table border = "2px">
\<<for _i, _item range $head>>
> I wonder if the locataion of the pictures should be stored inside the...
Personally I would store the images as external files in a location relative to the folder you save your published story HTML file in, you could then use a Relative URL to reference them.