What is the Anglican and Episcopalian basis for viewing the Trinity as a family that should contain a feminine element?
There are many overlapping views of the Anglican and Episcopalian Church with that of the Catholic Church.
They say a picture is worth a thousand words!
The Trinity of the Earth by Jerónimo Ezquerra
While the work of the Holy Spirit is widely known, we are hard-pressed to arrive at a precise definition. This may be because, compared with the Father and the Son, there is a lack of concrete imagery of the Holy Spirit. One issue is its gender. The Hebrew word for "spirit," ruach, is of feminine gender, while the Greek word pneuma is neuter. Despite the Church's official doctrine that the Holy Spirit is masculine, individuals and groups throughout the history of Christianity, including luminaries like St. Jerome (c.342-420) and Martin Luther (1483-1546), have repeatedly proposed that the Holy Spirit is feminine. In rabbinic Judaism the Holy Spirit is equated with the Shekhinah, the mother aspect of God. In light of the biblical notion of the androgynous image of God who created male and female in his image (Gen. 1:27), it has been suggested that a feminine Holy Spirit would be the appropriate counterpart to the male figure of the Son, who is manifest in Jesus Christ. The work of the Holy Spirit as comforter, intercessor and source of inspiration could be represented in the ministrations of Mary and other holy women of God. - Holy Spirit
The Inclusive Language Lectionary published by the American National Council of Churches, to which many Protestant churches belong, states in its introduction "The God worshiped by the biblical authors and worshiped in the Church today cannot be regarded as having gender, race, or colour."
In general the imagery of God’s feminine side could be seen in some of the Reformers.
Martin Luther’s commentary on Isaiah 46:3 suggested that God has not spoken “more sweetly than in transferring a mother’s experiences to Himself … God cares for us with an everlasting maternal heart and feeling.” Commenting on Isaiah 49:15, Luther further highlights God’s immanence in these words: “I will not forsake you, because I am your mother. I cannot desert you.” For the reformers such as Luther, God is accessible through scripture, which he imaged as the womb of God. Through faith and an encounter with scripture, Luther suggests that we receive “paternal love and thoroughly Maternal Caresses.” Luther also said that God was the feminine breast upon which he cast himself in moments of utter exhaustion. Through feminine imagery, therefore, Luther illustrated the tenderness and accessibility of God.
For Calvin, all knowledge of God arises through biblical revelation. Therefore, to create an image of God in material form was contrary to scripture, he argued. Calvin said: “God’s glory is corrupted by an impious falsehood whenever any form is attached to him.” Scripture thus prohibits creating graven idol for God “by any visible image.”
Yet like Luther, Calvin makes use of maternal metaphors for God in Isaiah. Again, the immanence of God is illuminated through the mother motif. Isaiah, Calvin argued, used maternal images to help us understand God’s immanent care and love. God does not rely solely upon paternal images, but “in order to express his very strong affection, [God] chose to liken himself to a mother.” God, like a mother (Isaiah 42:14), “expresses astonishing warmth of love and tenderness of affection.” God “singularly loves her child, though she brought him forth with extreme pain.” Thus God has “manifested himself to be both their father and their mother, [and] will always assist them.” In defense of his maternal images of God, Calvin suggests that “in no other way than by such figures of speech can his ardent love toward us be expressed.” - Evidence for and Significance of Feminine God-Language from the Church Fathers to the Modern Era
Although the question asks for Anglican or Episcopalian sources, I would like simply to point out that the Catechism of the Catholic Church makes reference to the maternal aspects within the Sacred Trinity.
239 By calling God "Father", the language of faith indicates two main things: that God is the first origin of everything and transcendent authority; and that he is at the same time goodness and loving care for all his children. God's parental tenderness can also be expressed by the image of motherhood, which emphasizes God's immanence, the intimacy between Creator and creature. The language of faith thus draws on the human experience of parents, who are in a way the first representatives of God for man. But this experience also tells us that human parents are fallible and can disfigure the face of fatherhood and motherhood. We ought therefore to recall that God transcends the human distinction between the sexes. He is neither man nor woman: he is God. He also transcends human fatherhood and motherhood, although he is their origin and standard: no one is father as God is Father.
I am under the impression that there are no clearly defined teachings on this issue in either the Lutheran or Anglican Churches.
Disclaimer: With Lesley, I too neither support nor endorse the view of "the feminine" within the Godhead.