Topology optimization has gained significant attention in the scientific community as a means to automate the design process and explore novel geometries for various applications. In this study, we propose extending this method to the design of motor windings, with a specific focus on coreless electrical machines. These machines offer greater design freedom by eliminating iron teeth that would otherwise restrict the winding design space. Our objective is to optimize the motor winding to maximize the motor constant, a crucial metric balancing motor torque and Joule losses. We present a versatile design method that incorporates a case study but can be adapted to other scenarios. The contributions of this article encompass the adaptation and extension of the density-based topology optimization method for motor windings. Firstly, we propose a multi-coil interpolation scheme that enables the design of a winding pack consisting of multiple coils assembled without restrictions on their final geometry or position. Secondly, we formulate a 2.5-D topology optimization method that allows the coils to overlap in space, avoiding the need for a computationally expensive full 3-D analysis while maintaining reasonable computational time. Our approach yields a novel winding topology featuring tracks of varying width and thickness, resulting in a superior performance with a motor constant increase of up to 17% compared to references.