Make selection an array of entity IDs

Should have no visible effect yet.