Filling indices array