If a pin is INPUT, the impedance is very high. So the pin is floating.
If a pin is OUTPUT, it can be set HIGH or LOW.
So it it possible to use a pin as a open collector by switching it between INPUT and OUTPUT LOW. However two instructions are needed for the microcontroller, and using the pull-up resistor should be avoided. You have to read the datasheet for that.
The 'open collector' is not a real open collector, since the voltage on the pin may not be above 5V.
If you want to switch between open/floating and high 5V. You need a few instructions:
const int myPin 10;
// pin open/floating
// set as input, no pull-up in Arduino 1.0.1 and higher.
pinMode( myPin, INPUT);
// pin HIGH
// first set the pullup,
// to be sure the output is high at the moment the pin is set as OUTPUT
pinMode( myPin, INPUT_PULLUP);
pinMode( myPin, OUTPUT);
digitalWrite( myPin, HIGH);
The analog inputs can be set as digital input or digital output pins.
So it is the same for analog inputs.http://arduino.cc/en/Reference/pinModehttp://arduino.cc/en/Reference/digitalWrite