It is a particular variant of meaning b) to have in mind (to do something) , namely to have in mind to go somewhere (куда). "To go" here is usually omitted.