optimize along_index for vectorizable cases, fix #391