Make mincore operate only on map structs

And also alloc/free a struct for the vec argument instead of randomly
scribbling over something.