Is it possible to make widget return only data (eg, array)?

Is it possible to make widget return only data (eg, array)?