Iterative learning control (ILC) is a high-performance control design method for systems working in a repetitive manner. ILC has traditionally focused on tracking a reference defined at all points over a finite-time interval; recent developments have begun to exploit the design freedom unlocked by tracking only a finite number of distinct time instants driven by the needs of, e.g., robotic pick-and-place tasks. This paper proposes a generalized ILC paradigm, which extends and unifies the scope of existing design frameworks by amalgamating previous task descriptions and embedding system constraints on the input and output. A novel solution is then derived using a successive projection method, which provides well-defined convergence properties. The proposed design framework is illustrated by applying it to a spatial reference tracking problem with experimental results on a gantry robot testing platform demonstrating its effectiveness.