Add loop_index def to foreach

Actually added in the last commit, but documented now
also preserve entity mechs in the drop command