On piano, there are not the restrictions that emerge with guitar. There's a greater choice of notes, more can be reached comfortably and they can be shared by both hands. On guitar, the bass part is usually played on the E, A or D string. Any higher and it's just not bass.Yes, the melody generally goes on top, as humans tend to catch those notes more easily.So, you're left with the tune dictating where it gets played, and an appropriate bass note not too far away, fretwise, otherwise you won't reach it. Playing in E, A or D will be a bit of help, as the root notes are open strings. More to follow, but I'm off to gig now !!
The 'key' notes in a chord are 3 and 7. Root is a given, otherwise we wouldn't feel which chord was under that part of the melody. The 3 gives the answer to is it major or minor, and the seven (if present) gives more harmonic definition. In other words, use notes from the chord (obviously, unless you want to change the feel of the song), but you can afford to miss the 5 if you have to.Using strings 2,3 and 4 on guitar, assuming the tune is played on the top string, although sometimes it'll need to use string 2, you've a couple of strings for the chord.
If the tune happens to play root and around, you can use a different note in the bass. Sometimes you can use a walking bass line to get from one chord to the next, especially when the tune is static.Often one chord played per bar will suffice, on beat one, but depending where the tune line is going at that moment.
If there's room at the end of a bar, a nice trick is to put a bass note in,leading to the next bar, beat one. This note is either one fret above or one fret below the target note. It shouldn't work with the former, but it does. And it keeps your fingers close to where they need to be.
From the question, I don't think you're asking 'should I change the harmony?',but if you wish, a sus 2 or 4, or a 6th will not go amiss. If it sounds good - it probably is !
However - if that's your desire, this may help.Let's say there's a long note held over a bar in a song. Key doesn't matter for now. Let's say it's an E. Any chord containing an E MAY fit under it. So - Cmaj., Emaj.,Emin., C#min.,Amaj., Amin., Fmaj7., F#7., Ab+., C#o are some that spring to mind.When you consider where the harmony for that part of the song has come from, some of those choices are out of bounds, key wise or ear wise. But, thinking where it goes next may let that 'odd' chord back in. Suck it and see.10 choices is only a starter, really,I'm sure loads of other chords will make themselves known, so things could modulate quite easily, keeping the melody line as is.Folks may say you've wrecked the song, but that's in the eye (ear) of the beholder.