Scaler already lets you find the secondary dominants using the Secondary scale on the MOD page. A tutorial on Finding Seconday Dominants is inthe tutorials category.
Re using Emaj and A maj in as borrowed chords in the key of C maj: because these two chords are not scale chords they are borrowed from other scales (e.g. A min). If you look at the Secondary scale on the MOD page and use C maj as your secondary scale you will find that A7 is suggested as an alternative to D min
and E7 as an alternative to A min.
Also. without going too deeply into music theory, it is often possible to substitute chords which shre two notes with a scale. This can be done to introduce “colour” into your song, and provide variety (just as substituting a 7 chord for the triad introduces colour and variety). So again you can substitute A maj for A min and E maj for E min in the key of C maj.
For me there is one inviolable rule in music, “if it sounds right it is right”. All the other rules are for guidance and may, if warranted, be broken.
For example you may have the following chord sequence in C maj:
D min:- D-F-A
A maj 1st inversion:- C#-E-A
C maj:- C-E-G
A maj is a passing chord (not a scale chord) and playing the bottom notes of these chords in the bass gives you a bass that walks down by semi-tones, which could be really cool sounding.
Hope this gives you some ideas for your projects: try using secondary scales or substituting one note on a triad, and if it sounds right, then use it.