The output transistors on Arduino pins have about 40 ohms resistance if I remember right - however they have an absolute max rating of 40mA current too, so any safe use of the output pin will produce 1.6V or less for LOW and 3.4V or more for HIGH. Without a load on the pin you are measuring the +5V rail (unless your multimeter has a very low resistance).
TTL is an entirely separate (and obsolete) bipolar logic family - basically TTL and Arduino will inter-work, but you can’t strictly speaking guarantee that a TTL output can drive an Arduino input high since TTL outputs are only guaranteed to generate 2.5V when high (most will in fact give a lot higher, and the problem is easily cured with a pull-up resistor).
Any logic family is characterised by 4 voltages, VIL, VIH, VOL, VOH (being the guaranteed input voltages and guaranteed output voltages assuming fully loaded according to the family specifications. The key properly is that 0V < VOL < VIL < VIH < VOH < Vdd
BTW these voltages apply to fast changing signals not just DC voltages, TTL outputs rise to a lot higher than 2.5V in a millisecond, its how high they rise in the specified signal rise-time (~ 15ns) that matters for true compatibility.
[ BTW the use of Vcc and Vdd for logic positive rails is a bit random (for TTL the positive rail connects to the transistor collectors, hence Vcc. For early MOS logic families the positive rail connected to the drains (hence Vdd), but with CMOS both supply rails actually connect to MOS source’s, but we still call the positive supply Vdd and the ground Vss sometimes. Where is the logic! ]