I'm retired and looking at getting one of these [Elantra 2003 or 2004 cars] and I'd like to know how the reliability of the 4 and 6 cylnder compare.
? IIRC, the Elantra is only available with the 2.0L 4-banger in the USA. Did you mean "Sonata", which is available with 6cyl or 4cyl? What's your geographic location? FWIW, the 2.0L I4 "Beta" engine used in Elantras is fairly reliable from what I've heard from Elantra owners on this newsfroup. Again IIRC, the 4-banger used in the Sonata is less reliable than the one used in the Elantra. ICBW though.
Also, [I'd] like to know if their great warranty is transferrable
The 10 year/100,000 mile powertrain warranty is not transferable AFAICT.
Will either of these cars go 200,000 miles with normal maintenance or are there [big] problems at some milestone like transmission or other big cost item?
100,000 for sure. 150,000, highly probable. 200,000... don't know. Your geographic location is also important for answering this question; cars last longer in places like Arizona than they do in places like Michigan or Florida. (Road salt, sea salt, potholes, large number of idiot drivers, etcetera.) HTH,