First, you need to translate your list of pitches into frequencies in hertz. This is the basis of what you need for a harmony. Doubling the frequency puts the note up an octave and halving it lowers it an octave.
Playing bot the original tone and your upper/lower octaver will give you a primative pitch shifter kind of sound like this track uses an octave pitch shifter
to do something more advanced, you'll need to find out the equation to get a perfect 5th, major 2nd etc from your fundamental pitch. Beyond this you start to run into problems...
The problem here, is that the basic major scale harmonised is not equal, and by that I mean if you were to play each note and the 3rd above it you would get the intervals of: major 3rd, minor 3rd, minor 3rd, major 3rd, major 3rd, minor 3rd, minor 3rd, then up to the next note.
In order to make an adaptive harmony you must also assume that the inputted pitches make a major(for example) scale, and then that you are in perfect pitch(though you could adjust how accurate the singer has to be).
If the intent is to make a cool little pitch shifting app, might I suggest juts buying a pitch shifter, or doing some research into vocoders and voice synthesis equipment. There's probably even a vst plugin somewhere for free that will do the job for you!
Hope that helped :)